Tue, 09 Apr 2013 14:51:13 +0100
8010393: Update JAX-WS RI to 2.2.9-b12941
Reviewed-by: alanb, erikj
Contributed-by: miroslav.kos@oracle.com, martin.grebac@oracle.com
ohair@286 | 1 | /* |
alanb@368 | 2 | * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
ohair@286 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ohair@286 | 4 | * |
ohair@286 | 5 | * This code is free software; you can redistribute it and/or modify it |
ohair@286 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ohair@286 | 7 | * published by the Free Software Foundation. Oracle designates this |
ohair@286 | 8 | * particular file as subject to the "Classpath" exception as provided |
ohair@286 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
ohair@286 | 10 | * |
ohair@286 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
ohair@286 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ohair@286 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ohair@286 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
ohair@286 | 15 | * accompanied this code). |
ohair@286 | 16 | * |
ohair@286 | 17 | * You should have received a copy of the GNU General Public License version |
ohair@286 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
ohair@286 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ohair@286 | 20 | * |
ohair@286 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@286 | 22 | * or visit www.oracle.com if you need additional information or have any |
ohair@286 | 23 | * questions. |
ohair@286 | 24 | */ |
ohair@286 | 25 | |
ohair@286 | 26 | package com.sun.xml.internal.messaging.saaj.soap.name; |
ohair@286 | 27 | |
ohair@286 | 28 | import java.util.logging.Level; |
ohair@286 | 29 | import java.util.logging.Logger; |
ohair@286 | 30 | |
ohair@286 | 31 | import javax.xml.namespace.QName; |
ohair@286 | 32 | import javax.xml.soap.Name; |
ohair@286 | 33 | import javax.xml.soap.SOAPConstants; |
ohair@286 | 34 | |
ohair@286 | 35 | //import com.sun.org.apache.xerces.internal.xni.NamespaceContext; |
ohair@286 | 36 | import org.w3c.dom.Element; |
ohair@286 | 37 | import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; |
ohair@286 | 38 | |
ohair@286 | 39 | public class NameImpl implements Name { |
ohair@286 | 40 | public static final String XML_NAMESPACE_PREFIX = "xml"; |
ohair@286 | 41 | public static final String XML_SCHEMA_NAMESPACE_PREFIX = "xs"; |
ohair@286 | 42 | public static final String SOAP_ENVELOPE_PREFIX = "SOAP-ENV"; |
ohair@286 | 43 | |
ohair@286 | 44 | public static final String XML_NAMESPACE = |
ohair@286 | 45 | "http://www.w3.org/XML/1998/namespace"; |
ohair@286 | 46 | public static final String SOAP11_NAMESPACE = |
ohair@286 | 47 | SOAPConstants.URI_NS_SOAP_ENVELOPE; |
ohair@286 | 48 | public static final String SOAP12_NAMESPACE = |
ohair@286 | 49 | SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE; |
ohair@286 | 50 | public static final String XML_SCHEMA_NAMESPACE = |
ohair@286 | 51 | "http://www.w3.org/2001/XMLSchema"; |
ohair@286 | 52 | |
ohair@286 | 53 | protected String uri = ""; |
ohair@286 | 54 | protected String localName = ""; |
ohair@286 | 55 | protected String prefix = ""; |
ohair@286 | 56 | private String qualifiedName = null; |
ohair@286 | 57 | |
ohair@286 | 58 | protected static final Logger log = |
ohair@286 | 59 | Logger.getLogger(LogDomainConstants.NAMING_DOMAIN, |
ohair@286 | 60 | "com.sun.xml.internal.messaging.saaj.soap.name.LocalStrings"); |
ohair@286 | 61 | |
ohair@286 | 62 | /** |
ohair@286 | 63 | * XML Information Set REC |
ohair@286 | 64 | * all namespace attributes (including those named xmlns, |
ohair@286 | 65 | * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/ |
ohair@286 | 66 | */ |
ohair@286 | 67 | public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern(); |
ohair@286 | 68 | |
ohair@286 | 69 | protected NameImpl(String name) { |
ohair@286 | 70 | this.localName = name == null ? "" : name; |
ohair@286 | 71 | } |
ohair@286 | 72 | |
ohair@286 | 73 | protected NameImpl(String name, String prefix, String uri) { |
ohair@286 | 74 | this.uri = uri == null ? "" : uri; |
ohair@286 | 75 | this.localName = name == null ? "" : name; |
ohair@286 | 76 | this.prefix = prefix == null ? "" : prefix; |
ohair@286 | 77 | |
ohair@286 | 78 | if (this.prefix.equals("xmlns") && this.uri.equals("")) { |
ohair@286 | 79 | this.uri = XMLNS_URI; |
ohair@286 | 80 | } |
ohair@286 | 81 | if (this.uri.equals(XMLNS_URI) && this.prefix.equals("")) { |
ohair@286 | 82 | this.prefix = "xmlns"; |
ohair@286 | 83 | } |
ohair@286 | 84 | } |
ohair@286 | 85 | |
ohair@286 | 86 | public static Name convertToName(QName qname) { |
ohair@286 | 87 | return new NameImpl(qname.getLocalPart(), |
ohair@286 | 88 | qname.getPrefix(), |
ohair@286 | 89 | qname.getNamespaceURI()); |
ohair@286 | 90 | } |
ohair@286 | 91 | |
ohair@286 | 92 | public static QName convertToQName(Name name) { |
ohair@286 | 93 | return new QName(name.getURI(), |
ohair@286 | 94 | name.getLocalName(), |
ohair@286 | 95 | name.getPrefix()); |
ohair@286 | 96 | } |
ohair@286 | 97 | |
ohair@286 | 98 | public static NameImpl createFromUnqualifiedName(String name) { |
ohair@286 | 99 | return new NameImpl(name); |
ohair@286 | 100 | } |
ohair@286 | 101 | |
ohair@286 | 102 | public static Name createFromTagName(String tagName) { |
ohair@286 | 103 | return createFromTagAndUri(tagName, ""); |
ohair@286 | 104 | } |
ohair@286 | 105 | |
ohair@286 | 106 | public static Name createFromQualifiedName( |
ohair@286 | 107 | String qualifiedName, |
ohair@286 | 108 | String uri) { |
ohair@286 | 109 | return createFromTagAndUri(qualifiedName, uri); |
ohair@286 | 110 | } |
ohair@286 | 111 | |
ohair@286 | 112 | protected static Name createFromTagAndUri(String tagName, String uri) { |
ohair@286 | 113 | if (tagName == null) { |
ohair@286 | 114 | log.severe("SAAJ0201.name.not.created.from.null.tag"); |
ohair@286 | 115 | throw new IllegalArgumentException("Cannot create a name from a null tag."); |
ohair@286 | 116 | } |
ohair@286 | 117 | int index = tagName.indexOf(':'); |
ohair@286 | 118 | if (index < 0) { |
ohair@286 | 119 | return new NameImpl(tagName, "", uri); |
ohair@286 | 120 | } else { |
ohair@286 | 121 | return new NameImpl( |
ohair@286 | 122 | tagName.substring(index + 1), |
ohair@286 | 123 | tagName.substring(0, index), |
ohair@286 | 124 | uri); |
ohair@286 | 125 | } |
ohair@286 | 126 | } |
ohair@286 | 127 | |
ohair@286 | 128 | protected static int getPrefixSeparatorIndex(String qualifiedName) { |
ohair@286 | 129 | int index = qualifiedName.indexOf(':'); |
ohair@286 | 130 | if (index < 0) { |
ohair@286 | 131 | log.log( |
ohair@286 | 132 | Level.SEVERE, |
ohair@286 | 133 | "SAAJ0202.name.invalid.arg.format", |
ohair@286 | 134 | new String[] { qualifiedName }); |
ohair@286 | 135 | throw new IllegalArgumentException( |
ohair@286 | 136 | "Argument \"" |
ohair@286 | 137 | + qualifiedName |
ohair@286 | 138 | + "\" must be of the form: \"prefix:localName\""); |
ohair@286 | 139 | } |
ohair@286 | 140 | return index; |
ohair@286 | 141 | } |
ohair@286 | 142 | |
ohair@286 | 143 | public static String getPrefixFromQualifiedName(String qualifiedName) { |
ohair@286 | 144 | return qualifiedName.substring( |
ohair@286 | 145 | 0, |
ohair@286 | 146 | getPrefixSeparatorIndex(qualifiedName)); |
ohair@286 | 147 | } |
ohair@286 | 148 | |
ohair@286 | 149 | public static String getLocalNameFromQualifiedName(String qualifiedName) { |
ohair@286 | 150 | return qualifiedName.substring( |
ohair@286 | 151 | getPrefixSeparatorIndex(qualifiedName) + 1); |
ohair@286 | 152 | } |
ohair@286 | 153 | |
ohair@286 | 154 | public static String getPrefixFromTagName(String tagName) { |
ohair@286 | 155 | if (isQualified(tagName)) { |
ohair@286 | 156 | return getPrefixFromQualifiedName(tagName); |
ohair@286 | 157 | } |
ohair@286 | 158 | return ""; |
ohair@286 | 159 | } |
ohair@286 | 160 | |
ohair@286 | 161 | public static String getLocalNameFromTagName(String tagName) { |
ohair@286 | 162 | if (isQualified(tagName)) { |
ohair@286 | 163 | return getLocalNameFromQualifiedName(tagName); |
ohair@286 | 164 | } |
ohair@286 | 165 | return tagName; |
ohair@286 | 166 | } |
ohair@286 | 167 | |
ohair@286 | 168 | public static boolean isQualified(String tagName) { |
ohair@286 | 169 | return tagName.indexOf(':') >= 0; |
ohair@286 | 170 | } |
ohair@286 | 171 | |
ohair@286 | 172 | public static NameImpl create(String name, String prefix, String uri) { |
ohair@286 | 173 | if (prefix == null) |
ohair@286 | 174 | prefix = ""; |
ohair@286 | 175 | if (uri == null) |
ohair@286 | 176 | uri = ""; |
ohair@286 | 177 | if (name == null) |
ohair@286 | 178 | name = ""; |
ohair@286 | 179 | |
ohair@286 | 180 | if (!uri.equals("") && !name.equals("")) { |
ohair@286 | 181 | if (uri.equals(NameImpl.SOAP11_NAMESPACE)) { |
ohair@286 | 182 | if (name.equalsIgnoreCase("Envelope")) |
ohair@286 | 183 | return createEnvelope1_1Name(prefix); |
ohair@286 | 184 | else if (name.equalsIgnoreCase("Header")) |
ohair@286 | 185 | return createHeader1_1Name(prefix); |
ohair@286 | 186 | else if (name.equalsIgnoreCase("Body")) |
ohair@286 | 187 | return createBody1_1Name(prefix); |
ohair@286 | 188 | else if (name.equalsIgnoreCase("Fault")) |
ohair@286 | 189 | return createFault1_1Name(prefix); |
ohair@286 | 190 | else |
ohair@286 | 191 | return new SOAP1_1Name(name, prefix); |
ohair@286 | 192 | } else if (uri.equals(SOAP12_NAMESPACE)) { |
ohair@286 | 193 | if (name.equalsIgnoreCase("Envelope")) |
ohair@286 | 194 | return createEnvelope1_2Name(prefix); |
ohair@286 | 195 | else if (name.equalsIgnoreCase("Header")) |
ohair@286 | 196 | return createHeader1_2Name(prefix); |
ohair@286 | 197 | else if (name.equalsIgnoreCase("Body")) |
ohair@286 | 198 | return createBody1_2Name(prefix); |
ohair@286 | 199 | else if ( |
ohair@286 | 200 | name.equals("Fault") |
ohair@286 | 201 | || name.equals("Reason") |
ohair@286 | 202 | || name.equals("Detail")) |
ohair@286 | 203 | return createFault1_2Name(name, prefix); |
ohair@286 | 204 | else if (name.equals("Code") || name.equals("Subcode")) |
ohair@286 | 205 | return createCodeSubcode1_2Name(prefix, name); |
ohair@286 | 206 | else |
ohair@286 | 207 | return new SOAP1_2Name(name, prefix); |
ohair@286 | 208 | } |
ohair@286 | 209 | |
ohair@286 | 210 | } |
ohair@286 | 211 | return new NameImpl(name, prefix, uri); |
ohair@286 | 212 | } |
ohair@286 | 213 | |
ohair@286 | 214 | public static String createQName(String prefix, String localName) { |
ohair@286 | 215 | if (prefix == null || prefix.equals("")) { |
ohair@286 | 216 | return localName; |
ohair@286 | 217 | } |
ohair@286 | 218 | return prefix + ":" + localName; |
ohair@286 | 219 | } |
ohair@286 | 220 | |
ohair@286 | 221 | public boolean equals(Object obj) { |
ohair@286 | 222 | if (!(obj instanceof Name)) { |
ohair@286 | 223 | return false; |
ohair@286 | 224 | } |
ohair@286 | 225 | |
ohair@286 | 226 | Name otherName = (Name) obj; |
ohair@286 | 227 | |
ohair@286 | 228 | if (!uri.equals(otherName.getURI())) { |
ohair@286 | 229 | return false; |
ohair@286 | 230 | } |
ohair@286 | 231 | |
ohair@286 | 232 | if (!localName.equals(otherName.getLocalName())) { |
ohair@286 | 233 | return false; |
ohair@286 | 234 | } |
ohair@286 | 235 | |
ohair@286 | 236 | return true; |
ohair@286 | 237 | } |
ohair@286 | 238 | |
alanb@368 | 239 | public int hashCode() { |
alanb@368 | 240 | return localName.hashCode(); |
alanb@368 | 241 | } |
alanb@368 | 242 | |
ohair@286 | 243 | /** |
ohair@286 | 244 | * Get the local name part of this XML Name. |
ohair@286 | 245 | * |
ohair@286 | 246 | * @return a string for the local name. |
ohair@286 | 247 | */ |
ohair@286 | 248 | public String getLocalName() { |
ohair@286 | 249 | return localName; |
ohair@286 | 250 | } |
ohair@286 | 251 | |
ohair@286 | 252 | /* getQualifiedName is inherited from QName */ |
ohair@286 | 253 | |
ohair@286 | 254 | /** |
ohair@286 | 255 | * Returns the prefix associated with the namespace of the name. |
ohair@286 | 256 | * |
ohair@286 | 257 | * @return the prefix as a string. |
ohair@286 | 258 | */ |
ohair@286 | 259 | public String getPrefix() { |
ohair@286 | 260 | return prefix; |
ohair@286 | 261 | } |
ohair@286 | 262 | |
ohair@286 | 263 | /** |
ohair@286 | 264 | * Returns the URI associated of the namespace. |
ohair@286 | 265 | * |
ohair@286 | 266 | * @return the uri as a string. |
ohair@286 | 267 | */ |
ohair@286 | 268 | public String getURI() { |
ohair@286 | 269 | return uri; |
ohair@286 | 270 | } |
ohair@286 | 271 | |
ohair@286 | 272 | /** |
ohair@286 | 273 | * Returns a String version of the name suitable for use in an XML document. |
ohair@286 | 274 | */ |
ohair@286 | 275 | public String getQualifiedName() { |
ohair@286 | 276 | if (qualifiedName == null) { |
ohair@286 | 277 | if (prefix != null && prefix.length() > 0) { |
ohair@286 | 278 | qualifiedName = prefix + ":" + localName; |
ohair@286 | 279 | } else { |
ohair@286 | 280 | qualifiedName = localName; |
ohair@286 | 281 | } |
ohair@286 | 282 | } |
ohair@286 | 283 | return qualifiedName; |
ohair@286 | 284 | } |
ohair@286 | 285 | |
ohair@286 | 286 | /** |
ohair@286 | 287 | * Create a name object for a SOAP1.1 Envelope. |
ohair@286 | 288 | */ |
ohair@286 | 289 | public static NameImpl createEnvelope1_1Name(String prefix) { |
ohair@286 | 290 | return new Envelope1_1Name(prefix); |
ohair@286 | 291 | } |
ohair@286 | 292 | |
ohair@286 | 293 | /** |
ohair@286 | 294 | * Create a name object for a SOAP1.2 Envelope. |
ohair@286 | 295 | */ |
ohair@286 | 296 | public static NameImpl createEnvelope1_2Name(String prefix) { |
ohair@286 | 297 | return new Envelope1_2Name(prefix); |
ohair@286 | 298 | } |
ohair@286 | 299 | |
ohair@286 | 300 | /** |
ohair@286 | 301 | * Create a name object for a SOAP1.1 Header. |
ohair@286 | 302 | */ |
ohair@286 | 303 | public static NameImpl createHeader1_1Name(String prefix) { |
ohair@286 | 304 | return new Header1_1Name(prefix); |
ohair@286 | 305 | } |
ohair@286 | 306 | |
ohair@286 | 307 | /** |
ohair@286 | 308 | * Create a name object for a SOAP1.2 Header. |
ohair@286 | 309 | */ |
ohair@286 | 310 | public static NameImpl createHeader1_2Name(String prefix) { |
ohair@286 | 311 | return new Header1_2Name(prefix); |
ohair@286 | 312 | } |
ohair@286 | 313 | |
ohair@286 | 314 | /** |
ohair@286 | 315 | * Create a name object for a SOAP1.1 Body. |
ohair@286 | 316 | */ |
ohair@286 | 317 | public static NameImpl createBody1_1Name(String prefix) { |
ohair@286 | 318 | return new Body1_1Name(prefix); |
ohair@286 | 319 | } |
ohair@286 | 320 | |
ohair@286 | 321 | /** |
ohair@286 | 322 | * Create a name object for a SOAP1.2 Body. |
ohair@286 | 323 | */ |
ohair@286 | 324 | public static NameImpl createBody1_2Name(String prefix) { |
ohair@286 | 325 | return new Body1_2Name(prefix); |
ohair@286 | 326 | } |
ohair@286 | 327 | |
ohair@286 | 328 | /** |
ohair@286 | 329 | * Create a name object for a SOAP1.1 Fault. |
ohair@286 | 330 | */ |
ohair@286 | 331 | public static NameImpl createFault1_1Name(String prefix) { |
ohair@286 | 332 | return new Fault1_1Name(prefix); |
ohair@286 | 333 | } |
ohair@286 | 334 | |
ohair@286 | 335 | /** |
ohair@286 | 336 | * Create a name object for a SOAP1.2 NotUnderstood element. |
ohair@286 | 337 | */ |
ohair@286 | 338 | public static NameImpl createNotUnderstood1_2Name(String prefix) { |
ohair@286 | 339 | return new NotUnderstood1_2Name(prefix); |
ohair@286 | 340 | } |
ohair@286 | 341 | |
ohair@286 | 342 | /** |
ohair@286 | 343 | * Create a name object for a SOAP1.2 Upgrade element. |
ohair@286 | 344 | */ |
ohair@286 | 345 | public static NameImpl createUpgrade1_2Name(String prefix) { |
ohair@286 | 346 | return new Upgrade1_2Name(prefix); |
ohair@286 | 347 | } |
ohair@286 | 348 | |
ohair@286 | 349 | /** |
ohair@286 | 350 | * Create a name object for a SOAP1.2 SupportedEnvelope Upgrade element. |
ohair@286 | 351 | */ |
ohair@286 | 352 | public static NameImpl createSupportedEnvelope1_2Name(String prefix) { |
ohair@286 | 353 | return new SupportedEnvelope1_2Name(prefix); |
ohair@286 | 354 | } |
ohair@286 | 355 | |
ohair@286 | 356 | /** |
ohair@286 | 357 | * Create a name object for a SOAP1.2 |
ohair@286 | 358 | * Fault, Reason or Detail. |
ohair@286 | 359 | * |
ohair@286 | 360 | * @param localName Local Name of element |
ohair@286 | 361 | */ |
ohair@286 | 362 | public static NameImpl createFault1_2Name( |
ohair@286 | 363 | String localName, |
ohair@286 | 364 | String prefix) { |
ohair@286 | 365 | return new Fault1_2Name(localName, prefix); |
ohair@286 | 366 | } |
ohair@286 | 367 | |
ohair@286 | 368 | /** |
ohair@286 | 369 | * Create a name object for a SOAP1.2 Fault/Code or Subcode. |
ohair@286 | 370 | * |
ohair@286 | 371 | * @param localName Either "Code" or "Subcode" |
ohair@286 | 372 | */ |
ohair@286 | 373 | public static NameImpl createCodeSubcode1_2Name( |
ohair@286 | 374 | String prefix, |
ohair@286 | 375 | String localName) { |
ohair@286 | 376 | return new CodeSubcode1_2Name(localName, prefix); |
ohair@286 | 377 | } |
ohair@286 | 378 | |
ohair@286 | 379 | /** |
ohair@286 | 380 | * Create a name object for a SOAP1.1 Fault Detail. |
ohair@286 | 381 | */ |
ohair@286 | 382 | public static NameImpl createDetail1_1Name() { |
ohair@286 | 383 | return new Detail1_1Name(); |
ohair@286 | 384 | } |
ohair@286 | 385 | |
ohair@286 | 386 | public static NameImpl createDetail1_1Name(String prefix) { |
ohair@286 | 387 | return new Detail1_1Name(prefix); |
ohair@286 | 388 | } |
ohair@286 | 389 | |
ohair@286 | 390 | public static NameImpl createFaultElement1_1Name(String localName) { |
ohair@286 | 391 | return new FaultElement1_1Name(localName); |
ohair@286 | 392 | } |
ohair@286 | 393 | |
ohair@286 | 394 | public static NameImpl createFaultElement1_1Name(String localName, |
ohair@286 | 395 | String prefix) { |
ohair@286 | 396 | return new FaultElement1_1Name(localName, prefix); |
ohair@286 | 397 | } |
ohair@286 | 398 | |
ohair@286 | 399 | public static NameImpl createSOAP11Name(String string) { |
ohair@286 | 400 | return new SOAP1_1Name(string, null); |
ohair@286 | 401 | } |
ohair@286 | 402 | public static NameImpl createSOAP12Name(String string) { |
ohair@286 | 403 | return new SOAP1_2Name(string, null); |
ohair@286 | 404 | } |
ohair@286 | 405 | |
ohair@286 | 406 | public static NameImpl createSOAP12Name(String localName, String prefix) { |
ohair@286 | 407 | return new SOAP1_2Name(localName, prefix); |
ohair@286 | 408 | } |
ohair@286 | 409 | |
ohair@286 | 410 | public static NameImpl createXmlName(String localName) { |
ohair@286 | 411 | return new NameImpl(localName, XML_NAMESPACE_PREFIX, XML_NAMESPACE); |
ohair@286 | 412 | } |
ohair@286 | 413 | |
ohair@286 | 414 | public static Name copyElementName(Element element) { |
ohair@286 | 415 | String localName = element.getLocalName(); |
ohair@286 | 416 | String prefix = element.getPrefix(); |
ohair@286 | 417 | String uri = element.getNamespaceURI(); |
ohair@286 | 418 | return create(localName, prefix, uri); |
ohair@286 | 419 | } |
ohair@286 | 420 | |
ohair@286 | 421 | |
ohair@286 | 422 | static class SOAP1_1Name extends NameImpl { |
ohair@286 | 423 | SOAP1_1Name(String name, String prefix) { |
ohair@286 | 424 | super( |
ohair@286 | 425 | name, |
ohair@286 | 426 | (prefix == null || prefix.equals("")) |
ohair@286 | 427 | ? NameImpl.SOAP_ENVELOPE_PREFIX |
ohair@286 | 428 | : prefix, |
ohair@286 | 429 | NameImpl.SOAP11_NAMESPACE); |
ohair@286 | 430 | } |
ohair@286 | 431 | } |
ohair@286 | 432 | |
ohair@286 | 433 | static class Envelope1_1Name extends SOAP1_1Name { |
ohair@286 | 434 | Envelope1_1Name(String prefix) { |
ohair@286 | 435 | super("Envelope", prefix); |
ohair@286 | 436 | } |
ohair@286 | 437 | } |
ohair@286 | 438 | |
ohair@286 | 439 | static class Header1_1Name extends SOAP1_1Name { |
ohair@286 | 440 | Header1_1Name(String prefix) { |
ohair@286 | 441 | super("Header", prefix); |
ohair@286 | 442 | } |
ohair@286 | 443 | } |
ohair@286 | 444 | |
ohair@286 | 445 | static class Body1_1Name extends SOAP1_1Name { |
ohair@286 | 446 | Body1_1Name(String prefix) { |
ohair@286 | 447 | super("Body", prefix); |
ohair@286 | 448 | } |
ohair@286 | 449 | } |
ohair@286 | 450 | |
ohair@286 | 451 | static class Fault1_1Name extends NameImpl { |
ohair@286 | 452 | Fault1_1Name(String prefix) { |
ohair@286 | 453 | super( |
ohair@286 | 454 | "Fault", |
ohair@286 | 455 | (prefix == null || prefix.equals("")) |
ohair@286 | 456 | ? SOAP_ENVELOPE_PREFIX |
ohair@286 | 457 | : prefix, |
ohair@286 | 458 | SOAP11_NAMESPACE); |
ohair@286 | 459 | } |
ohair@286 | 460 | } |
ohair@286 | 461 | |
ohair@286 | 462 | static class Detail1_1Name extends NameImpl { |
ohair@286 | 463 | Detail1_1Name() { |
ohair@286 | 464 | super("detail"); |
ohair@286 | 465 | } |
ohair@286 | 466 | |
ohair@286 | 467 | Detail1_1Name(String prefix) { |
ohair@286 | 468 | super("detail", prefix, ""); |
ohair@286 | 469 | } |
ohair@286 | 470 | } |
ohair@286 | 471 | |
ohair@286 | 472 | static class FaultElement1_1Name extends NameImpl { |
ohair@286 | 473 | FaultElement1_1Name(String localName) { |
ohair@286 | 474 | super(localName); |
ohair@286 | 475 | } |
ohair@286 | 476 | |
ohair@286 | 477 | FaultElement1_1Name(String localName, String prefix) { |
ohair@286 | 478 | super(localName, prefix, ""); |
ohair@286 | 479 | } |
ohair@286 | 480 | } |
ohair@286 | 481 | |
ohair@286 | 482 | static class SOAP1_2Name extends NameImpl { |
ohair@286 | 483 | SOAP1_2Name(String name, String prefix) { |
ohair@286 | 484 | super( |
ohair@286 | 485 | name, |
ohair@286 | 486 | (prefix == null || prefix.equals("")) |
ohair@286 | 487 | ? SOAPConstants.SOAP_ENV_PREFIX |
ohair@286 | 488 | : prefix, |
ohair@286 | 489 | SOAP12_NAMESPACE); |
ohair@286 | 490 | } |
ohair@286 | 491 | } |
ohair@286 | 492 | |
ohair@286 | 493 | static class Envelope1_2Name extends SOAP1_2Name { |
ohair@286 | 494 | Envelope1_2Name(String prefix) { |
ohair@286 | 495 | super("Envelope", prefix); |
ohair@286 | 496 | } |
ohair@286 | 497 | } |
ohair@286 | 498 | |
ohair@286 | 499 | static class Header1_2Name extends SOAP1_2Name { |
ohair@286 | 500 | Header1_2Name(String prefix) { |
ohair@286 | 501 | super("Header", prefix); |
ohair@286 | 502 | } |
ohair@286 | 503 | } |
ohair@286 | 504 | |
ohair@286 | 505 | static class Body1_2Name extends SOAP1_2Name { |
ohair@286 | 506 | Body1_2Name(String prefix) { |
ohair@286 | 507 | super("Body", prefix); |
ohair@286 | 508 | } |
ohair@286 | 509 | } |
ohair@286 | 510 | |
ohair@286 | 511 | static class Fault1_2Name extends NameImpl { |
ohair@286 | 512 | Fault1_2Name(String name, String prefix) { |
ohair@286 | 513 | super( |
ohair@286 | 514 | (name == null || name.equals("")) ? "Fault" : name, |
ohair@286 | 515 | (prefix == null || prefix.equals("")) |
ohair@286 | 516 | ? SOAPConstants.SOAP_ENV_PREFIX |
ohair@286 | 517 | : prefix, |
ohair@286 | 518 | SOAP12_NAMESPACE); |
ohair@286 | 519 | } |
ohair@286 | 520 | } |
ohair@286 | 521 | |
ohair@286 | 522 | static class NotUnderstood1_2Name extends NameImpl { |
ohair@286 | 523 | NotUnderstood1_2Name(String prefix) { |
ohair@286 | 524 | super( |
ohair@286 | 525 | "NotUnderstood", |
ohair@286 | 526 | (prefix == null || prefix.equals("")) |
ohair@286 | 527 | ? SOAPConstants.SOAP_ENV_PREFIX |
ohair@286 | 528 | : prefix, |
ohair@286 | 529 | SOAP12_NAMESPACE); |
ohair@286 | 530 | } |
ohair@286 | 531 | } |
ohair@286 | 532 | |
ohair@286 | 533 | static class Upgrade1_2Name extends NameImpl { |
ohair@286 | 534 | Upgrade1_2Name(String prefix) { |
ohair@286 | 535 | super( |
ohair@286 | 536 | "Upgrade", |
ohair@286 | 537 | (prefix == null || prefix.equals("")) |
ohair@286 | 538 | ? SOAPConstants.SOAP_ENV_PREFIX |
ohair@286 | 539 | : prefix, |
ohair@286 | 540 | SOAP12_NAMESPACE); |
ohair@286 | 541 | } |
ohair@286 | 542 | } |
ohair@286 | 543 | |
ohair@286 | 544 | static class SupportedEnvelope1_2Name extends NameImpl { |
ohair@286 | 545 | SupportedEnvelope1_2Name(String prefix) { |
ohair@286 | 546 | super( |
ohair@286 | 547 | "SupportedEnvelope", |
ohair@286 | 548 | (prefix == null || prefix.equals("")) |
ohair@286 | 549 | ? SOAPConstants.SOAP_ENV_PREFIX |
ohair@286 | 550 | : prefix, |
ohair@286 | 551 | SOAP12_NAMESPACE); |
ohair@286 | 552 | } |
ohair@286 | 553 | } |
ohair@286 | 554 | |
ohair@286 | 555 | static class CodeSubcode1_2Name extends SOAP1_2Name { |
ohair@286 | 556 | CodeSubcode1_2Name(String prefix, String localName) { |
ohair@286 | 557 | super(prefix, localName); |
ohair@286 | 558 | } |
ohair@286 | 559 | } |
ohair@286 | 560 | |
ohair@286 | 561 | } |