Thu, 31 Aug 2017 15:18:52 +0800
merge
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. |
aoqi@0 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@0 | 4 | * |
aoqi@0 | 5 | * This code is free software; you can redistribute it and/or modify it |
aoqi@0 | 6 | * under the terms of the GNU General Public License version 2 only, as |
aoqi@0 | 7 | * published by the Free Software Foundation. Oracle designates this |
aoqi@0 | 8 | * particular file as subject to the "Classpath" exception as provided |
aoqi@0 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
aoqi@0 | 10 | * |
aoqi@0 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@0 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@0 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@0 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
aoqi@0 | 15 | * accompanied this code). |
aoqi@0 | 16 | * |
aoqi@0 | 17 | * You should have received a copy of the GNU General Public License version |
aoqi@0 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@0 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@0 | 20 | * |
aoqi@0 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@0 | 22 | * or visit www.oracle.com if you need additional information or have any |
aoqi@0 | 23 | * questions. |
aoqi@0 | 24 | */ |
aoqi@0 | 25 | |
aoqi@0 | 26 | package javax.xml.soap; |
aoqi@0 | 27 | |
aoqi@0 | 28 | import javax.xml.namespace.QName; |
aoqi@0 | 29 | |
aoqi@0 | 30 | /** |
aoqi@0 | 31 | * The definition of constants pertaining to the SOAP protocol. |
aoqi@0 | 32 | */ |
aoqi@0 | 33 | public interface SOAPConstants { |
aoqi@0 | 34 | /** |
aoqi@0 | 35 | * Used to create <code>MessageFactory</code> instances that create |
aoqi@0 | 36 | * <code>SOAPMessages</code> whose concrete type is based on the |
aoqi@0 | 37 | * <code>Content-Type</code> MIME header passed to the |
aoqi@0 | 38 | * <code>createMessage</code> method. If no <code>Content-Type</code> |
aoqi@0 | 39 | * header is passed then the <code>createMessage</code> may throw an |
aoqi@0 | 40 | * <code>IllegalArgumentException</code> or, in the case of the no |
aoqi@0 | 41 | * argument version of <code>createMessage</code>, an |
aoqi@0 | 42 | * <code>UnsupportedOperationException</code>. |
aoqi@0 | 43 | * |
aoqi@0 | 44 | * @since SAAJ 1.3 |
aoqi@0 | 45 | */ |
aoqi@0 | 46 | public static final String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol"; |
aoqi@0 | 47 | |
aoqi@0 | 48 | /** |
aoqi@0 | 49 | * Used to create <code>MessageFactory</code> instances that create |
aoqi@0 | 50 | * <code>SOAPMessages</code> whose behavior supports the SOAP 1.1 specification. |
aoqi@0 | 51 | * |
aoqi@0 | 52 | * @since SAAJ 1.3 |
aoqi@0 | 53 | */ |
aoqi@0 | 54 | public static final String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol"; |
aoqi@0 | 55 | |
aoqi@0 | 56 | /** |
aoqi@0 | 57 | * Used to create <code>MessageFactory</code> instances that create |
aoqi@0 | 58 | * <code>SOAPMessages</code> whose behavior supports the SOAP 1.2 |
aoqi@0 | 59 | * specification |
aoqi@0 | 60 | * |
aoqi@0 | 61 | * @since SAAJ 1.3 |
aoqi@0 | 62 | */ |
aoqi@0 | 63 | public static final String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol"; |
aoqi@0 | 64 | |
aoqi@0 | 65 | /** |
aoqi@0 | 66 | * The default protocol: SOAP 1.1 for backwards compatibility. |
aoqi@0 | 67 | * |
aoqi@0 | 68 | * @since SAAJ 1.3 |
aoqi@0 | 69 | */ |
aoqi@0 | 70 | public static final String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL; |
aoqi@0 | 71 | |
aoqi@0 | 72 | /** |
aoqi@0 | 73 | * The namespace identifier for the SOAP 1.1 envelope. |
aoqi@0 | 74 | * @since SAAJ 1.3 |
aoqi@0 | 75 | */ |
aoqi@0 | 76 | public static final String |
aoqi@0 | 77 | URI_NS_SOAP_1_1_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/"; |
aoqi@0 | 78 | /** |
aoqi@0 | 79 | * The namespace identifier for the SOAP 1.2 envelope. |
aoqi@0 | 80 | * @since SAAJ 1.3 |
aoqi@0 | 81 | */ |
aoqi@0 | 82 | public static final String |
aoqi@0 | 83 | URI_NS_SOAP_1_2_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope"; |
aoqi@0 | 84 | |
aoqi@0 | 85 | /** |
aoqi@0 | 86 | * The namespace identifier for the SOAP 1.1 envelope, All SOAPElements in this |
aoqi@0 | 87 | * namespace are defined by the SOAP 1.1 specification. |
aoqi@0 | 88 | */ |
aoqi@0 | 89 | public static final String |
aoqi@0 | 90 | URI_NS_SOAP_ENVELOPE = URI_NS_SOAP_1_1_ENVELOPE; |
aoqi@0 | 91 | |
aoqi@0 | 92 | /** |
aoqi@0 | 93 | * The namespace identifier for the SOAP 1.1 encoding. |
aoqi@0 | 94 | * An attribute named <code>encodingStyle</code> in the |
aoqi@0 | 95 | * <code>URI_NS_SOAP_ENVELOPE</code> namespace and set to the value |
aoqi@0 | 96 | * <code>URI_NS_SOAP_ENCODING</code> can be added to an element to indicate |
aoqi@0 | 97 | * that it is encoded using the rules in section 5 of the SOAP 1.1 |
aoqi@0 | 98 | * specification. |
aoqi@0 | 99 | */ |
aoqi@0 | 100 | public static final String |
aoqi@0 | 101 | URI_NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/"; |
aoqi@0 | 102 | |
aoqi@0 | 103 | /** |
aoqi@0 | 104 | * The namespace identifier for the SOAP 1.2 encoding. |
aoqi@0 | 105 | * @since SAAJ 1.3 |
aoqi@0 | 106 | */ |
aoqi@0 | 107 | public static final String |
aoqi@0 | 108 | URI_NS_SOAP_1_2_ENCODING = "http://www.w3.org/2003/05/soap-encoding"; |
aoqi@0 | 109 | |
aoqi@0 | 110 | /** |
aoqi@0 | 111 | * The media type of the <code>Content-Type</code> MIME header in SOAP 1.1. |
aoqi@0 | 112 | * @since SAAJ 1.3 |
aoqi@0 | 113 | */ |
aoqi@0 | 114 | public static final String |
aoqi@0 | 115 | SOAP_1_1_CONTENT_TYPE = "text/xml"; |
aoqi@0 | 116 | |
aoqi@0 | 117 | /** |
aoqi@0 | 118 | * The media type of the <code>Content-Type</code> MIME header in SOAP 1.2. |
aoqi@0 | 119 | * @since SAAJ 1.3 |
aoqi@0 | 120 | */ |
aoqi@0 | 121 | public static final String |
aoqi@0 | 122 | SOAP_1_2_CONTENT_TYPE = "application/soap+xml"; |
aoqi@0 | 123 | |
aoqi@0 | 124 | /** |
aoqi@0 | 125 | * The URI identifying the next application processing a SOAP request as the intended |
aoqi@0 | 126 | * actor for a SOAP 1.1 header entry (see section 4.2.2 of the SOAP 1.1 specification). |
aoqi@0 | 127 | * <p> |
aoqi@0 | 128 | * This value can be passed to |
aoqi@0 | 129 | * {@link SOAPHeader#examineMustUnderstandHeaderElements(String)}, |
aoqi@0 | 130 | * {@link SOAPHeader#examineHeaderElements(String)} and |
aoqi@0 | 131 | * {@link SOAPHeader#extractHeaderElements(String)} |
aoqi@0 | 132 | */ |
aoqi@0 | 133 | public static final String |
aoqi@0 | 134 | URI_SOAP_ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next"; |
aoqi@0 | 135 | |
aoqi@0 | 136 | /** |
aoqi@0 | 137 | * The URI identifying the next application processing a SOAP request as the intended |
aoqi@0 | 138 | * role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2 |
aoqi@0 | 139 | * specification). |
aoqi@0 | 140 | * @since SAAJ 1.3 |
aoqi@0 | 141 | */ |
aoqi@0 | 142 | public static final String |
aoqi@0 | 143 | URI_SOAP_1_2_ROLE_NEXT = URI_NS_SOAP_1_2_ENVELOPE + "/role/next"; |
aoqi@0 | 144 | |
aoqi@0 | 145 | /** |
aoqi@0 | 146 | * The URI specifying the role None in SOAP 1.2. |
aoqi@0 | 147 | * @since SAAJ 1.3 |
aoqi@0 | 148 | */ |
aoqi@0 | 149 | public static final String |
aoqi@0 | 150 | URI_SOAP_1_2_ROLE_NONE = URI_NS_SOAP_1_2_ENVELOPE + "/role/none"; |
aoqi@0 | 151 | |
aoqi@0 | 152 | /** |
aoqi@0 | 153 | * The URI identifying the ultimate receiver of the SOAP 1.2 message. |
aoqi@0 | 154 | * @since SAAJ 1.3 |
aoqi@0 | 155 | */ |
aoqi@0 | 156 | public static final String |
aoqi@0 | 157 | URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER = |
aoqi@0 | 158 | URI_NS_SOAP_1_2_ENVELOPE + "/role/ultimateReceiver"; |
aoqi@0 | 159 | |
aoqi@0 | 160 | /** |
aoqi@0 | 161 | * The default namespace prefix for http://www.w3.org/2003/05/soap-envelope |
aoqi@0 | 162 | * @since SAAJ 1.3 |
aoqi@0 | 163 | */ |
aoqi@0 | 164 | public static final String SOAP_ENV_PREFIX = "env"; |
aoqi@0 | 165 | |
aoqi@0 | 166 | /** |
aoqi@0 | 167 | * SOAP 1.2 VersionMismatch Fault |
aoqi@0 | 168 | * @since SAAJ 1.3 |
aoqi@0 | 169 | */ |
aoqi@0 | 170 | public static final QName SOAP_VERSIONMISMATCH_FAULT = |
aoqi@0 | 171 | new QName(URI_NS_SOAP_1_2_ENVELOPE, "VersionMismatch", SOAP_ENV_PREFIX); |
aoqi@0 | 172 | |
aoqi@0 | 173 | /** |
aoqi@0 | 174 | * SOAP 1.2 MustUnderstand Fault |
aoqi@0 | 175 | * @since SAAJ 1.3 |
aoqi@0 | 176 | */ |
aoqi@0 | 177 | public static final QName SOAP_MUSTUNDERSTAND_FAULT = |
aoqi@0 | 178 | new QName(URI_NS_SOAP_1_2_ENVELOPE, "MustUnderstand", SOAP_ENV_PREFIX); |
aoqi@0 | 179 | |
aoqi@0 | 180 | /** |
aoqi@0 | 181 | * SOAP 1.2 DataEncodingUnknown Fault |
aoqi@0 | 182 | * @since SAAJ 1.3 |
aoqi@0 | 183 | */ |
aoqi@0 | 184 | public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT = |
aoqi@0 | 185 | new QName(URI_NS_SOAP_1_2_ENVELOPE, "DataEncodingUnknown", SOAP_ENV_PREFIX); |
aoqi@0 | 186 | |
aoqi@0 | 187 | /** |
aoqi@0 | 188 | * SOAP 1.2 Sender Fault |
aoqi@0 | 189 | * @since SAAJ 1.3 |
aoqi@0 | 190 | */ |
aoqi@0 | 191 | public static final QName SOAP_SENDER_FAULT = |
aoqi@0 | 192 | new QName(URI_NS_SOAP_1_2_ENVELOPE, "Sender", SOAP_ENV_PREFIX); |
aoqi@0 | 193 | |
aoqi@0 | 194 | /** |
aoqi@0 | 195 | * SOAP 1.2 Receiver Fault |
aoqi@0 | 196 | * @since SAAJ 1.3 |
aoqi@0 | 197 | */ |
aoqi@0 | 198 | public static final QName SOAP_RECEIVER_FAULT = |
aoqi@0 | 199 | new QName(URI_NS_SOAP_1_2_ENVELOPE, "Receiver", SOAP_ENV_PREFIX); |
aoqi@0 | 200 | |
aoqi@0 | 201 | } |