001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */package org.apache.cxf.ws.addressing;
019:
020: import java.util.Collections;
021: import java.util.HashSet;
022: import java.util.Set;
023: import javax.xml.namespace.QName;
024:
025: /**
026: * Holder for WS-Addressing names (of headers, namespaces etc.).
027: */
028: public final class Names {
029:
030: public static final String WSA_NAMESPACE_NAME = "http://www.w3.org/2005/08/addressing";
031: public static final String WSA_NAMESPACE_WSDL_NAME = "http://www.w3.org/2005/02/addressing/wsdl";
032: public static final String WSA_NAMESPACE_PATTERN = "/addressing";
033:
034: public static final String WSA_REFERENCE_PARAMETERS_NAME = "ReferenceParameters";
035: public static final QName WSA_REFERENCE_PARAMETERS_QNAME = new QName(
036: WSA_NAMESPACE_NAME, WSA_REFERENCE_PARAMETERS_NAME);
037:
038: public static final String WSA_IS_REFERENCE_PARAMETER_NAME = "IsReferenceParameter";
039: public static final QName WSA_IS_REFERENCE_PARAMETER_QNAME = new QName(
040: WSA_NAMESPACE_NAME, WSA_IS_REFERENCE_PARAMETER_NAME);
041:
042: public static final String WSA_ADDRESS_NAME = "Address";
043: public static final QName WSA_ADDRESS_QNAME = new QName(
044: WSA_NAMESPACE_NAME, WSA_ADDRESS_NAME);
045:
046: public static final String WSA_METADATA_NAME = "Metadata";
047: public static final QName WSA_METADATA_QNAME = new QName(
048: WSA_NAMESPACE_NAME, WSA_METADATA_NAME);
049:
050: public static final String WSA_FROM_NAME = "From";
051: public static final QName WSA_FROM_QNAME = new QName(
052: WSA_NAMESPACE_NAME, WSA_FROM_NAME);
053:
054: public static final String WSA_TO_NAME = "To";
055: public static final QName WSA_TO_QNAME = new QName(
056: WSA_NAMESPACE_NAME, WSA_TO_NAME);
057:
058: public static final String WSA_REPLYTO_NAME = "ReplyTo";
059: public static final QName WSA_REPLYTO_QNAME = new QName(
060: WSA_NAMESPACE_NAME, WSA_REPLYTO_NAME);
061:
062: public static final String WSA_FAULTTO_NAME = "FaultTo";
063: public static final QName WSA_FAULTTO_QNAME = new QName(
064: WSA_NAMESPACE_NAME, "FaultTo");
065:
066: public static final String WSA_ACTION_NAME = "Action";
067: public static final QName WSA_ACTION_QNAME = new QName(
068: WSA_NAMESPACE_NAME, WSA_ACTION_NAME);
069:
070: public static final String WSA_MESSAGEID_NAME = "MessageID";
071: public static final QName WSA_MESSAGEID_QNAME = new QName(
072: WSA_NAMESPACE_NAME, WSA_MESSAGEID_NAME);
073:
074: public static final String WSA_REPLY_NAME = "reply";
075: public static final String WSA_RELATIONSHIP_DELIMITER = "/";
076: public static final String WSA_RELATIONSHIP_REPLY = WSA_NAMESPACE_NAME
077: + WSA_RELATIONSHIP_DELIMITER + WSA_REPLY_NAME;
078:
079: public static final String WSA_RELATESTO_NAME = "RelatesTo";
080: public static final QName WSA_RELATESTO_QNAME = new QName(
081: WSA_NAMESPACE_NAME, WSA_RELATESTO_NAME);
082:
083: public static final String WSA_RELATIONSHIPTYPE_NAME = "RelationshipType";
084: public static final QName WSA_RELATIONSHIPTYPE_QNAME = new QName(
085: WSA_NAMESPACE_NAME, WSA_RELATIONSHIPTYPE_NAME);
086:
087: public static final String WSA_ANONYMOUS_ADDRESS = WSA_NAMESPACE_NAME
088: + "/anonymous";
089: public static final String WSA_NONE_ADDRESS = WSA_NAMESPACE_NAME
090: + "/none";
091:
092: public static final String WSA_FAULT_DELIMITER = "/fault";
093: public static final String WSA_DEFAULT_FAULT_ACTION = WSA_NAMESPACE_NAME
094: + WSA_FAULT_DELIMITER;
095: // REVISIT delimiter should be ":" if target namespace is a URN
096: public static final String WSA_ACTION_DELIMITER = "/";
097:
098: public static final String WSAW_ACTION_NAME = "Action";
099: public static final QName WSAW_ACTION_QNAME = new QName(
100: WSA_NAMESPACE_WSDL_NAME, WSAW_ACTION_NAME);
101:
102: public static final String WSAW_USING_ADDRESSING_NAME = "UsingAddressing";
103: public static final QName WSAW_USING_ADDRESSING_QNAME = new QName(
104: WSA_NAMESPACE_WSDL_NAME, WSAW_USING_ADDRESSING_NAME);
105:
106: public static final String WSDL_INSTANCE_NAMESPACE_NAME = "http://www.w3.org/2004/08/wsdl-instance";
107:
108: public static final String INVALID_MAP_NAME = "InvalidMessageAddressingProperty";
109: public static final QName INVALID_MAP_QNAME = new QName(
110: WSA_NAMESPACE_NAME, INVALID_MAP_NAME);
111: public static final String MAP_REQUIRED_NAME = "MessageAddressingPropertyRequired";
112: public static final QName MAP_REQUIRED_QNAME = new QName(
113: WSA_NAMESPACE_NAME, MAP_REQUIRED_NAME);
114: public static final String DESTINATION_UNREACHABLE_NAME = "DestinationUnreachable";
115: public static final QName DESTINATION_UNREACHABLE_QNAME = new QName(
116: WSA_NAMESPACE_NAME, DESTINATION_UNREACHABLE_NAME);
117: public static final String ACTION_NOT_SUPPORTED_NAME = "ActionNotSupported";
118: public static final QName ACTION_NOT_SUPPORTED_QNAME = new QName(
119: WSA_NAMESPACE_NAME, ACTION_NOT_SUPPORTED_NAME);
120: public static final String ENDPOINT_UNAVAILABLE_NAME = "EndpointUnavailable";
121: public static final QName ENDPOINT_UNAVAILABLE_QNAME = new QName(
122: WSA_NAMESPACE_NAME, ENDPOINT_UNAVAILABLE_NAME);
123:
124: public static final String DUPLICATE_MESSAGE_ID_NAME = "DuplicateMessageID";
125: public static final QName DUPLICATE_MESSAGE_ID_QNAME = new QName(
126: WSA_NAMESPACE_NAME, DUPLICATE_MESSAGE_ID_NAME);
127:
128: public static final String SOAP11HTTP_ADDRESSING_BINDING = "http://schemas.xmlsoap.org/soap/envelope/?addressing=ms";
129: public static final String SOAP12HTTP_ADDRESSING_BINDING = "http://www.w3.org/2003/05/soap-envelope?addressing=ms";
130:
131: public static final String SOAP_ACTION_HEADER = "SOAPAction";
132:
133: /**
134: * The set of headers understood by the protocol binding.
135: */
136: public static final Set<QName> HEADERS;
137: static {
138: Set<QName> headers = new HashSet<QName>();
139: headers.add(WSA_FROM_QNAME);
140: headers.add(WSA_TO_QNAME);
141: headers.add(WSA_REPLYTO_QNAME);
142: headers.add(WSA_FAULTTO_QNAME);
143: headers.add(WSA_ACTION_QNAME);
144: headers.add(WSA_MESSAGEID_QNAME);
145: HEADERS = Collections.unmodifiableSet(headers);
146: }
147:
148: /**
149: * Prevents instantiation.
150: */
151: private Names() {
152: }
153: }
|