src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java

changeset 0
373ffda63c9a
child 637
9c07ef4934dd
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java	Wed Apr 27 01:27:09 2016 +0800
     1.3 @@ -0,0 +1,119 @@
     1.4 +/*
     1.5 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Oracle designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Oracle in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 + * or visit www.oracle.com if you need additional information or have any
    1.26 + * questions.
    1.27 + */
    1.28 +
    1.29 +package com.sun.xml.internal.ws.addressing;
    1.30 +
    1.31 +import javax.xml.namespace.QName;
    1.32 +
    1.33 +import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
    1.34 +
    1.35 +/**
    1.36 + * Constants for W3C WS-Addressing version
    1.37 + *
    1.38 + * @author Arun Gupta
    1.39 + */
    1.40 +public interface W3CAddressingConstants {
    1.41 +    public static final String WSA_NAMESPACE_NAME = "http://www.w3.org/2005/08/addressing";
    1.42 +    public static final String WSA_NAMESPACE_WSDL_NAME = "http://www.w3.org/2006/05/addressing/wsdl";
    1.43 +
    1.44 +    public static final String WSAW_SERVICENAME_NAME = "ServiceName";
    1.45 +    public static final String WSAW_INTERFACENAME_NAME = "InterfaceName";
    1.46 +    public static final String WSAW_ENDPOINTNAME_NAME = "EndpointName";
    1.47 +
    1.48 +    public static final String WSA_REFERENCEPROPERTIES_NAME = "ReferenceParameters";
    1.49 +    public static final QName WSA_REFERENCEPROPERTIES_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_REFERENCEPROPERTIES_NAME);
    1.50 +
    1.51 +    public static final String WSA_REFERENCEPARAMETERS_NAME = "ReferenceParameters";
    1.52 +    public static final QName WSA_REFERENCEPARAMETERS_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_REFERENCEPARAMETERS_NAME);
    1.53 +
    1.54 +    public static final String WSA_METADATA_NAME = "Metadata";
    1.55 +    public static final QName WSA_METADATA_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_METADATA_NAME);
    1.56 +
    1.57 +    public static final String WSA_ADDRESS_NAME = "Address";
    1.58 +    public static final QName WSA_ADDRESS_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_ADDRESS_NAME);
    1.59 +
    1.60 +    public static final String WSA_ANONYMOUS_ADDRESS = WSA_NAMESPACE_NAME + "/anonymous";
    1.61 +    public static final String WSA_NONE_ADDRESS = WSA_NAMESPACE_NAME + "/none";
    1.62 +
    1.63 +    public static final String WSA_DEFAULT_FAULT_ACTION = WSA_NAMESPACE_NAME + "/fault";
    1.64 +
    1.65 +    public static final String WSA_EPR_NAME = "EndpointReference";
    1.66 +    public static final QName WSA_EPR_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_EPR_NAME);
    1.67 +
    1.68 +
    1.69 +    public static final String WSAW_USING_ADDRESSING_NAME = "UsingAddressing";
    1.70 +    public static final QName WSAW_USING_ADDRESSING_QNAME = new QName(WSA_NAMESPACE_WSDL_NAME, WSAW_USING_ADDRESSING_NAME);
    1.71 +
    1.72 +    public static final QName INVALID_MAP_QNAME = new QName(WSA_NAMESPACE_NAME, "InvalidAddressingHeader");
    1.73 +    public static final QName MAP_REQUIRED_QNAME = new QName(WSA_NAMESPACE_NAME, "MessageAddressingHeaderRequired");
    1.74 +    public static final QName DESTINATION_UNREACHABLE_QNAME = new QName(WSA_NAMESPACE_NAME, "DestinationUnreachable");
    1.75 +    public static final QName ACTION_NOT_SUPPORTED_QNAME = new QName(WSA_NAMESPACE_NAME, "ActionNotSupported");
    1.76 +    public static final QName ENDPOINT_UNAVAILABLE_QNAME = new QName(WSA_NAMESPACE_NAME, "EndpointUnavailable");
    1.77 +
    1.78 +    public static final String ACTION_NOT_SUPPORTED_TEXT = "The \"%s\" cannot be processed at the receiver";
    1.79 +    public static final String DESTINATION_UNREACHABLE_TEXT = "No route can be determined to reach %s";
    1.80 +    public static final String ENDPOINT_UNAVAILABLE_TEXT = "The endpoint is unable to process the message at this time";
    1.81 +    public static final String INVALID_MAP_TEXT = "A header representing a Message Addressing Property is not valid and the message cannot be processed";
    1.82 +    public static final String MAP_REQUIRED_TEXT = "A required header representing a Message Addressing Property is not present";
    1.83 +
    1.84 +    public static final QName PROBLEM_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME, "ProblemAction");
    1.85 +    public static final QName PROBLEM_HEADER_QNAME_QNAME = new QName(WSA_NAMESPACE_NAME, "ProblemHeaderQName");
    1.86 +    public static final QName FAULT_DETAIL_QNAME = new QName(WSA_NAMESPACE_NAME, "FaultDetail");
    1.87 +
    1.88 +    // Fault subsubcode when an invalid address is specified.
    1.89 +    public static final QName INVALID_ADDRESS_SUBCODE = new QName(WSA_NAMESPACE_NAME, "InvalidAddress",
    1.90 +                                                                  AddressingVersion.W3C.getPrefix());
    1.91 +
    1.92 +    // Fault subsubcode when an invalid header was expected to be EndpointReference but was not valid.
    1.93 +    public static final QName INVALID_EPR = new QName(WSA_NAMESPACE_NAME, "InvalidEPR", AddressingVersion.W3C.getPrefix());
    1.94 +
    1.95 +    // Fault subsubcode when greater than expected number of the specified header is received.
    1.96 +    public static final QName INVALID_CARDINALITY = new QName(WSA_NAMESPACE_NAME, "InvalidCardinality",
    1.97 +                                                              AddressingVersion.W3C.getPrefix());
    1.98 +
    1.99 +    // Fault subsubcode when an invalid header was expected to be EndpointReference but did not contain address.
   1.100 +    public static final QName MISSING_ADDRESS_IN_EPR = new QName(WSA_NAMESPACE_NAME, "MissingAddressInEPR",
   1.101 +                                                                 AddressingVersion.W3C.getPrefix());
   1.102 +
   1.103 +    // Fault subsubcode when a header contains a message id that was a duplicate of one already received.
   1.104 +    public static final QName DUPLICATE_MESSAGEID = new QName(WSA_NAMESPACE_NAME, "DuplicateMessageID",
   1.105 +                                                              AddressingVersion.W3C.getPrefix());
   1.106 +
   1.107 +    // Fault subsubcode when <code>Action</code> and <code>SOAPAction</code> for the mesage did not match.
   1.108 +    public static final QName ACTION_MISMATCH = new QName(WSA_NAMESPACE_NAME, "ActionMismatch",
   1.109 +                                                          AddressingVersion.W3C.getPrefix());
   1.110 +
   1.111 +    // Fault subsubcode when the only address supported is the anonymous address.
   1.112 +    public static final QName ONLY_ANONYMOUS_ADDRESS_SUPPORTED = new QName(WSA_NAMESPACE_NAME, "OnlyAnonymousAddressSupported",
   1.113 +                                                                           AddressingVersion.W3C.getPrefix());
   1.114 +
   1.115 +    //Fault subsubcode when anonymous address is not supported.
   1.116 +    public static final QName ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED = new QName(WSA_NAMESPACE_NAME, "OnlyNonAnonymousAddressSupported",
   1.117 +                                                                               AddressingVersion.W3C.getPrefix());
   1.118 +
   1.119 +    public static final String ANONYMOUS_EPR = "<EndpointReference xmlns=\"http://www.w3.org/2005/08/addressing\">\n" +
   1.120 +            "    <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>\n" +
   1.121 +            "</EndpointReference>";
   1.122 +}

mercurial