author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 45678 | jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java@65fdff10664d |
child 47930 | f2de2c55c6c7 |
permissions | -rw-r--r-- |
12009 | 1 |
/* |
45678
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
34467
diff
changeset
|
2 |
* Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. |
12009 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package javax.xml.soap; |
|
27 |
||
28 |
import javax.xml.namespace.QName; |
|
29 |
||
30 |
import org.w3c.dom.Element; |
|
31 |
||
32 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
33 |
* {@code SOAPFactory} is a factory for creating various objects |
12009 | 34 |
* that exist in the SOAP XML tree. |
35 |
||
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
36 |
* {@code SOAPFactory} can be |
12009 | 37 |
* used to create XML fragments that will eventually end up in the |
38 |
* SOAP part. These fragments can be inserted as children of the |
|
39 |
* {@link SOAPHeaderElement} or {@link SOAPBodyElement} or |
|
40 |
* {@link SOAPEnvelope} or other {@link SOAPElement} objects. |
|
41 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
42 |
* {@code SOAPFactory} also has methods to create |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
43 |
* {@code javax.xml.soap.Detail} objects as well as |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
44 |
* {@code java.xml.soap.Name} objects. |
12009 | 45 |
* |
25840 | 46 |
* @since 1.6 |
12009 | 47 |
*/ |
48 |
public abstract class SOAPFactory { |
|
49 |
||
50 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
51 |
* Class name of default {@code SOAPFactory} implementation. |
16791 | 52 |
*/ |
34467
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
53 |
private static final String DEFAULT_SOAP_FACTORY |
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
54 |
= "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl"; |
16791 | 55 |
|
56 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
57 |
* Creates a {@code SOAPElement} object from an existing DOM |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
58 |
* {@code Element}. If the DOM {@code Element} that is passed in |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
59 |
* as an argument is already a {@code SOAPElement} then this method |
12009 | 60 |
* must return it unmodified without any further work. Otherwise, a new |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
61 |
* {@code SOAPElement} is created and a deep copy is made of the |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
62 |
* {@code domElement} argument. The concrete type of the return value |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
63 |
* will depend on the name of the {@code domElement} argument. If any |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
64 |
* part of the tree rooted in {@code domElement} violates SOAP rules, a |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
65 |
* {@code SOAPException} will be thrown. |
12009 | 66 |
* |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
67 |
* @param domElement - the {@code Element} to be copied. |
12009 | 68 |
* |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
69 |
* @return a new {@code SOAPElement} that is a copy of {@code domElement}. |
12009 | 70 |
* |
71 |
* @exception SOAPException if there is an error in creating the |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
72 |
* {@code SOAPElement} object |
12009 | 73 |
* |
25840 | 74 |
* @since 1.6, SAAJ 1.3 |
12009 | 75 |
*/ |
76 |
public SOAPElement createElement(Element domElement) throws SOAPException { |
|
77 |
throw new UnsupportedOperationException("createElement(org.w3c.dom.Element) must be overridden by all subclasses of SOAPFactory."); |
|
78 |
} |
|
79 |
||
80 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
81 |
* Creates a {@code SOAPElement} object initialized with the |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
82 |
* given {@code Name} object. The concrete type of the return value |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
83 |
* will depend on the name given to the new {@code SOAPElement}. For |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
84 |
* instance, a new {@code SOAPElement} with the name |
12009 | 85 |
* "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
86 |
* {@code SOAPEnvelope} that supports SOAP 1.2 behavior to be created. |
12009 | 87 |
* |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
88 |
* @param name a {@code Name} object with the XML name for |
12009 | 89 |
* the new element |
90 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
91 |
* @return the new {@code SOAPElement} object that was |
12009 | 92 |
* created |
93 |
* |
|
94 |
* @exception SOAPException if there is an error in creating the |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
95 |
* {@code SOAPElement} object |
12009 | 96 |
* @see SOAPFactory#createElement(javax.xml.namespace.QName) |
97 |
*/ |
|
98 |
public abstract SOAPElement createElement(Name name) throws SOAPException; |
|
99 |
||
100 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
101 |
* Creates a {@code SOAPElement} object initialized with the |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
102 |
* given {@code QName} object. The concrete type of the return value |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
103 |
* will depend on the name given to the new {@code SOAPElement}. For |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
104 |
* instance, a new {@code SOAPElement} with the name |
12009 | 105 |
* "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
106 |
* {@code SOAPEnvelope} that supports SOAP 1.2 behavior to be created. |
12009 | 107 |
* |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
108 |
* @param qname a {@code QName} object with the XML name for |
12009 | 109 |
* the new element |
110 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
111 |
* @return the new {@code SOAPElement} object that was |
12009 | 112 |
* created |
113 |
* |
|
114 |
* @exception SOAPException if there is an error in creating the |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
115 |
* {@code SOAPElement} object |
12009 | 116 |
* @see SOAPFactory#createElement(Name) |
25840 | 117 |
* @since 1.6, SAAJ 1.3 |
12009 | 118 |
*/ |
119 |
public SOAPElement createElement(QName qname) throws SOAPException { |
|
120 |
throw new UnsupportedOperationException("createElement(QName) must be overridden by all subclasses of SOAPFactory."); |
|
121 |
} |
|
122 |
||
123 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
124 |
* Creates a {@code SOAPElement} object initialized with the |
12009 | 125 |
* given local name. |
126 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
127 |
* @param localName a {@code String} giving the local name for |
12009 | 128 |
* the new element |
129 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
130 |
* @return the new {@code SOAPElement} object that was |
12009 | 131 |
* created |
132 |
* |
|
133 |
* @exception SOAPException if there is an error in creating the |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
134 |
* {@code SOAPElement} object |
12009 | 135 |
*/ |
136 |
public abstract SOAPElement createElement(String localName) |
|
137 |
throws SOAPException; |
|
138 |
||
139 |
||
140 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
141 |
* Creates a new {@code SOAPElement} object with the given |
12009 | 142 |
* local name, prefix and uri. The concrete type of the return value |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
143 |
* will depend on the name given to the new {@code SOAPElement}. For |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
144 |
* instance, a new {@code SOAPElement} with the name |
12009 | 145 |
* "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
146 |
* {@code SOAPEnvelope} that supports SOAP 1.2 behavior to be created. |
12009 | 147 |
* |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
148 |
* @param localName a {@code String} giving the local name |
12009 | 149 |
* for the new element |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
150 |
* @param prefix the prefix for this {@code SOAPElement} |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
151 |
* @param uri a {@code String} giving the URI of the |
12009 | 152 |
* namespace to which the new element belongs |
45678
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
34467
diff
changeset
|
153 |
* @return the new {@code SOAPElement} object that was |
65fdff10664d
8176508: Update JAX-WS RI integration to latest version
aefimov
parents:
34467
diff
changeset
|
154 |
* created |
12009 | 155 |
* |
156 |
* @exception SOAPException if there is an error in creating the |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
157 |
* {@code SOAPElement} object |
12009 | 158 |
*/ |
159 |
public abstract SOAPElement createElement( |
|
160 |
String localName, |
|
161 |
String prefix, |
|
162 |
String uri) |
|
163 |
throws SOAPException; |
|
164 |
||
165 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
166 |
* Creates a new {@code Detail} object which serves as a container |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
167 |
* for {@code DetailEntry} objects. |
12009 | 168 |
* <P> |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
169 |
* This factory method creates {@code Detail} objects for use in |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
170 |
* situations where it is not practical to use the {@code SOAPFault} |
12009 | 171 |
* abstraction. |
172 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
173 |
* @return a {@code Detail} object |
12009 | 174 |
* @throws SOAPException if there is a SOAP error |
175 |
* @throws UnsupportedOperationException if the protocol specified |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
176 |
* for the SOAPFactory was {@code DYNAMIC_SOAP_PROTOCOL} |
12009 | 177 |
*/ |
178 |
public abstract Detail createDetail() throws SOAPException; |
|
179 |
||
180 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
181 |
*Creates a new {@code SOAPFault} object initialized with the given {@code reasonText} |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
182 |
* and {@code faultCode} |
12009 | 183 |
*@param reasonText the ReasonText/FaultString for the fault |
184 |
*@param faultCode the FaultCode for the fault |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
185 |
*@return a {@code SOAPFault} object |
12009 | 186 |
*@throws SOAPException if there is a SOAP error |
25840 | 187 |
*@since 1.6, SAAJ 1.3 |
12009 | 188 |
*/ |
189 |
public abstract SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException; |
|
190 |
||
191 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
192 |
*Creates a new default {@code SOAPFault} object |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
193 |
*@return a {@code SOAPFault} object |
12009 | 194 |
*@throws SOAPException if there is a SOAP error |
25840 | 195 |
*@since 1.6, SAAJ 1.3 |
12009 | 196 |
*/ |
197 |
public abstract SOAPFault createFault() throws SOAPException; |
|
198 |
||
199 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
200 |
* Creates a new {@code Name} object initialized with the |
12009 | 201 |
* given local name, namespace prefix, and namespace URI. |
202 |
* <P> |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
203 |
* This factory method creates {@code Name} objects for use in |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
204 |
* situations where it is not practical to use the {@code SOAPEnvelope} |
12009 | 205 |
* abstraction. |
206 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
207 |
* @param localName a {@code String} giving the local name |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
208 |
* @param prefix a {@code String} giving the prefix of the namespace |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
209 |
* @param uri a {@code String} giving the URI of the namespace |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
210 |
* @return a {@code Name} object initialized with the given |
12009 | 211 |
* local name, namespace prefix, and namespace URI |
212 |
* @throws SOAPException if there is a SOAP error |
|
213 |
*/ |
|
214 |
public abstract Name createName( |
|
215 |
String localName, |
|
216 |
String prefix, |
|
217 |
String uri) |
|
218 |
throws SOAPException; |
|
219 |
||
220 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
221 |
* Creates a new {@code Name} object initialized with the |
12009 | 222 |
* given local name. |
223 |
* <P> |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
224 |
* This factory method creates {@code Name} objects for use in |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
225 |
* situations where it is not practical to use the {@code SOAPEnvelope} |
12009 | 226 |
* abstraction. |
227 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
228 |
* @param localName a {@code String} giving the local name |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
229 |
* @return a {@code Name} object initialized with the given |
12009 | 230 |
* local name |
231 |
* @throws SOAPException if there is a SOAP error |
|
232 |
*/ |
|
233 |
public abstract Name createName(String localName) throws SOAPException; |
|
234 |
||
235 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
236 |
* Creates a new {@code SOAPFactory} object that is an instance of |
34467
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
237 |
* the default implementation (SOAP 1.1). |
12009 | 238 |
* |
34467
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
239 |
* This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the |
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
240 |
* {@link javax.xml.soap.SOAPFactory} class. |
12009 | 241 |
* |
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
242 |
* @return a new instance of a {@code SOAPFactory} |
12009 | 243 |
* |
244 |
* @exception SOAPException if there was an error creating the |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
245 |
* default {@code SOAPFactory} |
12009 | 246 |
* @see SAAJMetaFactory |
247 |
*/ |
|
248 |
public static SOAPFactory newInstance() |
|
249 |
throws SOAPException |
|
250 |
{ |
|
251 |
try { |
|
34467
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
252 |
SOAPFactory factory = FactoryFinder.find( |
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
253 |
SOAPFactory.class, |
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
254 |
DEFAULT_SOAP_FACTORY, |
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
255 |
false); |
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
256 |
if (factory != null) return factory; |
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
257 |
|
024f1ce7da02
8131334: SAAJ Plugability Layer: using java.util.ServiceLoader
mkos
parents:
31746
diff
changeset
|
258 |
// leave it on SAAJMetaFactory |
12009 | 259 |
return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); |
260 |
} catch (Exception ex) { |
|
261 |
throw new SOAPException( |
|
262 |
"Unable to create SOAP Factory: " + ex.getMessage()); |
|
263 |
} |
|
264 |
||
265 |
} |
|
266 |
||
267 |
/** |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
268 |
* Creates a new {@code SOAPFactory} object that is an instance of |
12009 | 269 |
* the specified implementation, this method uses the SAAJMetaFactory to |
270 |
* locate the implementation class and create the SOAPFactory instance. |
|
271 |
* |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
272 |
* @return a new instance of a {@code SOAPFactory} |
12009 | 273 |
* |
274 |
* @param protocol a string constant representing the protocol of the |
|
275 |
* specified SOAP factory implementation. May be |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
276 |
* either {@code DYNAMIC_SOAP_PROTOCOL}, |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
277 |
* {@code DEFAULT_SOAP_PROTOCOL} (which is the same |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
278 |
* as) {@code SOAP_1_1_PROTOCOL}, or |
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
279 |
* {@code SOAP_1_2_PROTOCOL}. |
12009 | 280 |
* |
281 |
* @exception SOAPException if there was an error creating the |
|
31746
7573de6b8e46
8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents:
28326
diff
changeset
|
282 |
* specified {@code SOAPFactory} |
12009 | 283 |
* @see SAAJMetaFactory |
25840 | 284 |
* @since 1.6, SAAJ 1.3 |
12009 | 285 |
*/ |
286 |
public static SOAPFactory newInstance(String protocol) |
|
287 |
throws SOAPException { |
|
288 |
return SAAJMetaFactory.getInstance().newSOAPFactory(protocol); |
|
289 |
} |
|
290 |
} |