001: /*
002: * $Id: SOAPConstants.java,v 1.13 2006/03/30 00:59:40 ofung Exp $
003: * $Revision: 1.13 $
004: * $Date: 2006/03/30 00:59:40 $
005: */
006:
007: /*
008: * The contents of this file are subject to the terms
009: * of the Common Development and Distribution License
010: * (the License). You may not use this file except in
011: * compliance with the License.
012: *
013: * You can obtain a copy of the license at
014: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
015: * See the License for the specific language governing
016: * permissions and limitations under the License.
017: *
018: * When distributing Covered Code, include this CDDL
019: * Header Notice in each file and include the License file
020: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
021: * If applicable, add the following below the CDDL Header,
022: * with the fields enclosed by brackets [] replaced by
023: * you own identifying information:
024: * "Portions Copyrighted [year] [name of copyright owner]"
025: *
026: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
027: */
028: package javax.xml.soap;
029:
030: import javax.xml.namespace.QName;
031:
032: /**
033: * The definition of constants pertaining to the SOAP protocol.
034: */
035: public interface SOAPConstants {
036: /**
037: * Used to create <code>MessageFactory</code> instances that create
038: * <code>SOAPMessages</code> whose concrete type is based on the
039: * <code>Content-Type</code> MIME header passed to the
040: * <code>createMessage</code> method. If no <code>Content-Type</code>
041: * header is passed then the <code>createMessage</code> may throw an
042: * <code>IllegalArgumentException</code> or, in the case of the no
043: * argument version of <code>createMessage</code>, an
044: * <code>UnsupportedOperationException</code>.
045: *
046: * @since SAAJ 1.3
047: */
048: public static final String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol";
049:
050: /**
051: * Used to create <code>MessageFactory</code> instances that create
052: * <code>SOAPMessages</code> whose behavior supports the SOAP 1.1 specification.
053: *
054: * @since SAAJ 1.3
055: */
056: public static final String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
057:
058: /**
059: * Used to create <code>MessageFactory</code> instances that create
060: * <code>SOAPMessages</code> whose behavior supports the SOAP 1.2
061: * specification
062: *
063: * @since SAAJ 1.3
064: */
065: public static final String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol";
066:
067: /**
068: * The default protocol: SOAP 1.1 for backwards compatibility.
069: *
070: * @since SAAJ 1.3
071: */
072: public static final String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL;
073:
074: /**
075: * The namespace identifier for the SOAP 1.1 envelope.
076: * @since SAAJ 1.3
077: */
078: public static final String URI_NS_SOAP_1_1_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
079: /**
080: * The namespace identifier for the SOAP 1.2 envelope.
081: * @since SAAJ 1.3
082: */
083: public static final String URI_NS_SOAP_1_2_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope";
084:
085: /**
086: * The namespace identifier for the SOAP 1.1 envelope, All SOAPElements in this
087: * namespace are defined by the SOAP 1.1 specification.
088: */
089: public static final String URI_NS_SOAP_ENVELOPE = URI_NS_SOAP_1_1_ENVELOPE;
090:
091: /**
092: * The namespace identifier for the SOAP 1.1 encoding.
093: * An attribute named <code>encodingStyle</code> in the
094: * <code>URI_NS_SOAP_ENVELOPE</code> namespace and set to the value
095: * <code>URI_NS_SOAP_ENCODING</code> can be added to an element to indicate
096: * that it is encoded using the rules in section 5 of the SOAP 1.1
097: * specification.
098: */
099: public static final String URI_NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
100:
101: /**
102: * The namespace identifier for the SOAP 1.2 encoding.
103: * @since SAAJ 1.3
104: */
105: public static final String URI_NS_SOAP_1_2_ENCODING = "http://www.w3.org/2003/05/soap-encoding";
106:
107: /**
108: * The media type of the <code>Content-Type</code> MIME header in SOAP 1.1.
109: * @since SAAJ 1.3
110: */
111: public static final String SOAP_1_1_CONTENT_TYPE = "text/xml";
112:
113: /**
114: * The media type of the <code>Content-Type</code> MIME header in SOAP 1.2.
115: * @since SAAJ 1.3
116: */
117: public static final String SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
118:
119: /**
120: * The URI identifying the next application processing a SOAP request as the intended
121: * actor for a SOAP 1.1 header entry (see section 4.2.2 of the SOAP 1.1 specification).
122: * <p>
123: * This value can be passed to
124: * {@link SOAPHeader#examineMustUnderstandHeaderElements(String)},
125: * {@link SOAPHeader#examineHeaderElements(String)} and
126: * {@link SOAPHeader#extractHeaderElements(String)}
127: */
128: public static final String URI_SOAP_ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next";
129:
130: /**
131: * The URI identifying the next application processing a SOAP request as the intended
132: * role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2
133: * specification).
134: * @since SAAJ 1.3
135: */
136: public static final String URI_SOAP_1_2_ROLE_NEXT = URI_NS_SOAP_1_2_ENVELOPE
137: + "/role/next";
138:
139: /**
140: * The URI specifying the role None in SOAP 1.2.
141: * @since SAAJ 1.3
142: */
143: public static final String URI_SOAP_1_2_ROLE_NONE = URI_NS_SOAP_1_2_ENVELOPE
144: + "/role/none";
145:
146: /**
147: * The URI identifying the ultimate receiver of the SOAP 1.2 message.
148: * @since SAAJ 1.3
149: */
150: public static final String URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER = URI_NS_SOAP_1_2_ENVELOPE
151: + "/role/ultimateReceiver";
152:
153: /**
154: * The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
155: * @since SAAJ 1.3
156: */
157: public static final String SOAP_ENV_PREFIX = "env";
158:
159: /**
160: * SOAP 1.2 VersionMismatch Fault
161: * @since SAAJ 1.3
162: */
163: public static final QName SOAP_VERSIONMISMATCH_FAULT = new QName(
164: URI_NS_SOAP_1_2_ENVELOPE, "VersionMismatch",
165: SOAP_ENV_PREFIX);
166:
167: /**
168: * SOAP 1.2 MustUnderstand Fault
169: * @since SAAJ 1.3
170: */
171: public static final QName SOAP_MUSTUNDERSTAND_FAULT = new QName(
172: URI_NS_SOAP_1_2_ENVELOPE, "MustUnderstand", SOAP_ENV_PREFIX);
173:
174: /**
175: * SOAP 1.2 DataEncodingUnknown Fault
176: * @since SAAJ 1.3
177: */
178: public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT = new QName(
179: URI_NS_SOAP_1_2_ENVELOPE, "DataEncodingUnknown",
180: SOAP_ENV_PREFIX);
181:
182: /**
183: * SOAP 1.2 Sender Fault
184: * @since SAAJ 1.3
185: */
186: public static final QName SOAP_SENDER_FAULT = new QName(
187: URI_NS_SOAP_1_2_ENVELOPE, "Sender", SOAP_ENV_PREFIX);
188:
189: /**
190: * SOAP 1.2 Receiver Fault
191: * @since SAAJ 1.3
192: */
193: public static final QName SOAP_RECEIVER_FAULT = new QName(
194: URI_NS_SOAP_1_2_ENVELOPE, "Receiver", SOAP_ENV_PREFIX);
195:
196: }
|