author | avstepan |
Wed, 22 Apr 2015 15:26:20 +0400 | |
changeset 30005 | b2f720a258c4 |
parent 28326 | 2b9860c0d68a |
child 31746 | 7573de6b8e46 |
permissions | -rw-r--r-- |
12009 | 1 |
/* |
22679
d785acd84a14
8032639: Update copyright year to match last edit in jaxws repository for 2013
mkos
parents:
16791
diff
changeset
|
2 |
* Copyright (c) 2004, 2013, 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 java.util.Iterator; |
|
29 |
||
30 |
import javax.xml.namespace.QName; |
|
31 |
||
32 |
/** |
|
33 |
* An object representing an element of a SOAP message that is allowed but not |
|
34 |
* specifically prescribed by a SOAP specification. This interface serves as the |
|
35 |
* base interface for those objects that are specifically prescribed by a SOAP |
|
36 |
* specification. |
|
37 |
* <p> |
|
38 |
* Methods in this interface that are required to return SAAJ specific objects |
|
39 |
* may "silently" replace nodes in the tree as required to successfully return |
|
40 |
* objects of the correct type. See {@link #getChildElements()} and |
|
30005 | 41 |
* {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>} |
12009 | 42 |
* for details. |
25840 | 43 |
* |
44 |
* @since 1.6 |
|
12009 | 45 |
*/ |
46 |
public interface SOAPElement extends Node, org.w3c.dom.Element { |
|
47 |
||
48 |
/** |
|
30005 | 49 |
* Creates a new {@code SOAPElement} object initialized with the |
50 |
* given {@code Name} object and adds the new element to this |
|
51 |
* {@code SOAPElement} object. |
|
12009 | 52 |
* <P> |
53 |
* This method may be deprecated in a future release of SAAJ in favor of |
|
54 |
* addChildElement(javax.xml.namespace.QName) |
|
55 |
* |
|
30005 | 56 |
* @param name a {@code Name} object with the XML name for the |
12009 | 57 |
* new element |
58 |
* |
|
30005 | 59 |
* @return the new {@code SOAPElement} object that was created |
12009 | 60 |
* @exception SOAPException if there is an error in creating the |
30005 | 61 |
* {@code SOAPElement} object |
12009 | 62 |
* @see SOAPElement#addChildElement(javax.xml.namespace.QName) |
63 |
*/ |
|
64 |
public SOAPElement addChildElement(Name name) throws SOAPException; |
|
65 |
||
66 |
/** |
|
30005 | 67 |
* Creates a new {@code SOAPElement} object initialized with the given |
68 |
* {@code QName} object and adds the new element to this {@code SOAPElement} |
|
12009 | 69 |
* object. The <i>namespace</i>, <i>localname</i> and <i>prefix</i> of the new |
30005 | 70 |
* {@code SOAPElement} are all taken from the {@code qname} argument. |
12009 | 71 |
* |
30005 | 72 |
* @param qname a {@code QName} object with the XML name for the |
12009 | 73 |
* new element |
74 |
* |
|
30005 | 75 |
* @return the new {@code SOAPElement} object that was created |
12009 | 76 |
* @exception SOAPException if there is an error in creating the |
30005 | 77 |
* {@code SOAPElement} object |
12009 | 78 |
* @see SOAPElement#addChildElement(Name) |
25840 | 79 |
* @since 1.6, SAAJ 1.3 |
12009 | 80 |
*/ |
81 |
public SOAPElement addChildElement(QName qname) throws SOAPException; |
|
82 |
||
83 |
/** |
|
30005 | 84 |
* Creates a new {@code SOAPElement} object initialized with the |
12009 | 85 |
* specified local name and adds the new element to this |
30005 | 86 |
* {@code SOAPElement} object. |
87 |
* The new {@code SOAPElement} inherits any in-scope default namespace. |
|
12009 | 88 |
* |
30005 | 89 |
* @param localName a {@code String} giving the local name for |
12009 | 90 |
* the element |
30005 | 91 |
* @return the new {@code SOAPElement} object that was created |
12009 | 92 |
* @exception SOAPException if there is an error in creating the |
30005 | 93 |
* {@code SOAPElement} object |
12009 | 94 |
*/ |
95 |
public SOAPElement addChildElement(String localName) throws SOAPException; |
|
96 |
||
97 |
/** |
|
30005 | 98 |
* Creates a new {@code SOAPElement} object initialized with the |
12009 | 99 |
* specified local name and prefix and adds the new element to this |
30005 | 100 |
* {@code SOAPElement} object. |
12009 | 101 |
* |
30005 | 102 |
* @param localName a {@code String} giving the local name for |
12009 | 103 |
* the new element |
30005 | 104 |
* @param prefix a {@code String} giving the namespace prefix for |
12009 | 105 |
* the new element |
106 |
* |
|
30005 | 107 |
* @return the new {@code SOAPElement} object that was created |
108 |
* @exception SOAPException if the {@code prefix} is not valid in the |
|
109 |
* context of this {@code SOAPElement} or if there is an error in creating the |
|
110 |
* {@code SOAPElement} object |
|
12009 | 111 |
*/ |
112 |
public SOAPElement addChildElement(String localName, String prefix) |
|
113 |
throws SOAPException; |
|
114 |
||
115 |
/** |
|
30005 | 116 |
* Creates a new {@code SOAPElement} object initialized with the |
12009 | 117 |
* specified local name, prefix, and URI and adds the new element to this |
30005 | 118 |
* {@code SOAPElement} object. |
12009 | 119 |
* |
30005 | 120 |
* @param localName a {@code String} giving the local name for |
12009 | 121 |
* the new element |
30005 | 122 |
* @param prefix a {@code String} giving the namespace prefix for |
12009 | 123 |
* the new element |
30005 | 124 |
* @param uri a {@code String} giving the URI of the namespace |
12009 | 125 |
* to which the new element belongs |
126 |
* |
|
30005 | 127 |
* @return the new {@code SOAPElement} object that was created |
12009 | 128 |
* @exception SOAPException if there is an error in creating the |
30005 | 129 |
* {@code SOAPElement} object |
12009 | 130 |
*/ |
131 |
public SOAPElement addChildElement(String localName, String prefix, |
|
132 |
String uri) |
|
133 |
throws SOAPException; |
|
134 |
||
135 |
/** |
|
30005 | 136 |
* Add a {@code SOAPElement} as a child of this |
137 |
* {@code SOAPElement} instance. The {@code SOAPElement} |
|
12009 | 138 |
* is expected to be created by a |
30005 | 139 |
* {@code SOAPFactory}. Callers should not rely on the |
12009 | 140 |
* element instance being added as is into the XML |
141 |
* tree. Implementations could end up copying the content |
|
30005 | 142 |
* of the {@code SOAPElement} passed into an instance of |
143 |
* a different {@code SOAPElement} implementation. For |
|
144 |
* instance if {@code addChildElement()} is called on a |
|
145 |
* {@code SOAPHeader}, {@code element} will be copied |
|
146 |
* into an instance of a {@code SOAPHeaderElement}. |
|
12009 | 147 |
* |
30005 | 148 |
* <P>The fragment rooted in {@code element} is either added |
12009 | 149 |
* as a whole or not at all, if there was an error. |
150 |
* |
|
30005 | 151 |
* <P>The fragment rooted in {@code element} cannot contain |
12009 | 152 |
* elements named "Envelope", "Header" or "Body" and in the SOAP |
153 |
* namespace. Any namespace prefixes present in the fragment |
|
154 |
* should be fully resolved using appropriate namespace |
|
155 |
* declarations within the fragment itself. |
|
156 |
* |
|
30005 | 157 |
* @param element the {@code SOAPElement} to be added as a |
12009 | 158 |
* new child |
159 |
* |
|
160 |
* @exception SOAPException if there was an error in adding this |
|
161 |
* element as a child |
|
162 |
* |
|
163 |
* @return an instance representing the new SOAP element that was |
|
164 |
* actually added to the tree. |
|
165 |
*/ |
|
166 |
public SOAPElement addChildElement(SOAPElement element) |
|
167 |
throws SOAPException; |
|
168 |
||
169 |
/** |
|
30005 | 170 |
* Detaches all children of this {@code SOAPElement}. |
12009 | 171 |
* <p> |
172 |
* This method is useful for rolling back the construction of partially |
|
30005 | 173 |
* completed {@code SOAPHeaders} and {@code SOAPBodys} in |
12009 | 174 |
* preparation for sending a fault when an error condition is detected. It |
175 |
* is also useful for recycling portions of a document within a SOAP |
|
176 |
* message. |
|
177 |
* |
|
25840 | 178 |
* @since 1.6, SAAJ 1.2 |
12009 | 179 |
*/ |
180 |
public abstract void removeContents(); |
|
181 |
||
182 |
/** |
|
30005 | 183 |
* Creates a new {@code Text} object initialized with the given |
184 |
* {@code String} and adds it to this {@code SOAPElement} object. |
|
12009 | 185 |
* |
30005 | 186 |
* @param text a {@code String} object with the textual content to be added |
12009 | 187 |
* |
30005 | 188 |
* @return the {@code SOAPElement} object into which |
189 |
* the new {@code Text} object was inserted |
|
12009 | 190 |
* @exception SOAPException if there is an error in creating the |
30005 | 191 |
* new {@code Text} object or if it is not legal to |
12009 | 192 |
* attach it as a child to this |
30005 | 193 |
* {@code SOAPElement} |
12009 | 194 |
*/ |
195 |
public SOAPElement addTextNode(String text) throws SOAPException; |
|
196 |
||
197 |
/** |
|
198 |
* Adds an attribute with the specified name and value to this |
|
30005 | 199 |
* {@code SOAPElement} object. |
12009 | 200 |
* |
30005 | 201 |
* @param name a {@code Name} object with the name of the attribute |
202 |
* @param value a {@code String} giving the value of the attribute |
|
203 |
* @return the {@code SOAPElement} object into which the attribute was |
|
12009 | 204 |
* inserted |
205 |
* |
|
206 |
* @exception SOAPException if there is an error in creating the |
|
207 |
* Attribute, or it is invalid to set |
|
30005 | 208 |
an attribute with {@code Name} |
209 |
{@code name} on this SOAPElement. |
|
12009 | 210 |
* @see SOAPElement#addAttribute(javax.xml.namespace.QName, String) |
211 |
*/ |
|
212 |
public SOAPElement addAttribute(Name name, String value) |
|
213 |
throws SOAPException; |
|
214 |
||
215 |
/** |
|
216 |
* Adds an attribute with the specified name and value to this |
|
30005 | 217 |
* {@code SOAPElement} object. |
12009 | 218 |
* |
30005 | 219 |
* @param qname a {@code QName} object with the name of the attribute |
220 |
* @param value a {@code String} giving the value of the attribute |
|
221 |
* @return the {@code SOAPElement} object into which the attribute was |
|
12009 | 222 |
* inserted |
223 |
* |
|
224 |
* @exception SOAPException if there is an error in creating the |
|
225 |
* Attribute, or it is invalid to set |
|
30005 | 226 |
an attribute with {@code QName} |
227 |
{@code qname} on this SOAPElement. |
|
12009 | 228 |
* @see SOAPElement#addAttribute(Name, String) |
25840 | 229 |
* @since 1.6, SAAJ 1.3 |
12009 | 230 |
*/ |
231 |
public SOAPElement addAttribute(QName qname, String value) |
|
232 |
throws SOAPException; |
|
233 |
||
234 |
/** |
|
235 |
* Adds a namespace declaration with the specified prefix and URI to this |
|
30005 | 236 |
* {@code SOAPElement} object. |
12009 | 237 |
* |
30005 | 238 |
* @param prefix a {@code String} giving the prefix of the namespace |
239 |
* @param uri a {@code String} giving the uri of the namespace |
|
240 |
* @return the {@code SOAPElement} object into which this |
|
12009 | 241 |
* namespace declaration was inserted. |
242 |
* |
|
243 |
* @exception SOAPException if there is an error in creating the |
|
244 |
* namespace |
|
245 |
*/ |
|
246 |
public SOAPElement addNamespaceDeclaration(String prefix, String uri) |
|
247 |
throws SOAPException; |
|
248 |
||
249 |
/** |
|
250 |
* Returns the value of the attribute with the specified name. |
|
251 |
* |
|
30005 | 252 |
* @param name a {@code Name} object with the name of the attribute |
253 |
* @return a {@code String} giving the value of the specified |
|
12009 | 254 |
* attribute, Null if there is no such attribute |
255 |
* @see SOAPElement#getAttributeValue(javax.xml.namespace.QName) |
|
256 |
*/ |
|
257 |
public String getAttributeValue(Name name); |
|
258 |
||
259 |
/** |
|
260 |
* Returns the value of the attribute with the specified qname. |
|
261 |
* |
|
30005 | 262 |
* @param qname a {@code QName} object with the qname of the attribute |
263 |
* @return a {@code String} giving the value of the specified |
|
12009 | 264 |
* attribute, Null if there is no such attribute |
265 |
* @see SOAPElement#getAttributeValue(Name) |
|
25840 | 266 |
* @since 1.6, SAAJ 1.3 |
12009 | 267 |
*/ |
268 |
public String getAttributeValue(QName qname); |
|
269 |
||
270 |
/** |
|
30005 | 271 |
* Returns an {@code Iterator} over all of the attribute |
272 |
* {@code Name} objects in this |
|
273 |
* {@code SOAPElement} object. The iterator can be used to get |
|
12009 | 274 |
* the attribute names, which can then be passed to the method |
30005 | 275 |
* {@code getAttributeValue} to retrieve the value of each |
12009 | 276 |
* attribute. |
277 |
* |
|
278 |
* @see SOAPElement#getAllAttributesAsQNames() |
|
279 |
* @return an iterator over the names of the attributes |
|
280 |
*/ |
|
281 |
public Iterator getAllAttributes(); |
|
282 |
||
283 |
/** |
|
30005 | 284 |
* Returns an {@code Iterator} over all of the attributes |
285 |
* in this {@code SOAPElement} as {@code QName} objects. |
|
12009 | 286 |
* The iterator can be used to get the attribute QName, which can then |
30005 | 287 |
* be passed to the method {@code getAttributeValue} to retrieve |
12009 | 288 |
* the value of each attribute. |
289 |
* |
|
290 |
* @return an iterator over the QNames of the attributes |
|
291 |
* @see SOAPElement#getAllAttributes() |
|
25840 | 292 |
* @since 1.6, SAAJ 1.3 |
12009 | 293 |
*/ |
294 |
public Iterator getAllAttributesAsQNames(); |
|
295 |
||
296 |
||
297 |
/** |
|
298 |
* Returns the URI of the namespace that has the given prefix. |
|
299 |
* |
|
30005 | 300 |
* @param prefix a {@code String} giving the prefix of the namespace |
12009 | 301 |
* for which to search |
30005 | 302 |
* @return a {@code String} with the uri of the namespace that has |
12009 | 303 |
* the given prefix |
304 |
*/ |
|
305 |
public String getNamespaceURI(String prefix); |
|
306 |
||
307 |
/** |
|
30005 | 308 |
* Returns an {@code Iterator} over the namespace prefix |
309 |
* {@code String}s declared by this element. The prefixes returned by |
|
12009 | 310 |
* this iterator can be passed to the method |
30005 | 311 |
* {@code getNamespaceURI} to retrieve the URI of each namespace. |
12009 | 312 |
* |
313 |
* @return an iterator over the namespace prefixes in this |
|
30005 | 314 |
* {@code SOAPElement} object |
12009 | 315 |
*/ |
316 |
public Iterator getNamespacePrefixes(); |
|
317 |
||
318 |
/** |
|
30005 | 319 |
* Returns an {@code Iterator} over the namespace prefix |
320 |
* {@code String}s visible to this element. The prefixes returned by |
|
12009 | 321 |
* this iterator can be passed to the method |
30005 | 322 |
* {@code getNamespaceURI} to retrieve the URI of each namespace. |
12009 | 323 |
* |
324 |
* @return an iterator over the namespace prefixes are within scope of this |
|
30005 | 325 |
* {@code SOAPElement} object |
12009 | 326 |
* |
25840 | 327 |
* @since 1.6, SAAJ 1.2 |
12009 | 328 |
*/ |
329 |
public Iterator getVisibleNamespacePrefixes(); |
|
330 |
||
331 |
/** |
|
30005 | 332 |
* Creates a {@code QName} whose namespace URI is the one associated |
333 |
* with the parameter, {@code prefix}, in the context of this |
|
334 |
* {@code SOAPElement}. The remaining elements of the new |
|
335 |
* {@code QName} are taken directly from the parameters, |
|
336 |
* {@code localName} and {@code prefix}. |
|
12009 | 337 |
* |
338 |
* @param localName |
|
30005 | 339 |
* a {@code String} containing the local part of the name. |
12009 | 340 |
* @param prefix |
30005 | 341 |
* a {@code String} containing the prefix for the name. |
12009 | 342 |
* |
30005 | 343 |
* @return a {@code QName} with the specified {@code localName} |
344 |
* and {@code prefix}, and with a namespace that is associated |
|
345 |
* with the {@code prefix} in the context of this |
|
346 |
* {@code SOAPElement}. This namespace will be the same as |
|
12009 | 347 |
* the one that would be returned by |
348 |
* <code>{@link #getNamespaceURI(String)}</code> if it were given |
|
30005 | 349 |
* {@code prefix} as it's parameter. |
12009 | 350 |
* |
30005 | 351 |
* @exception SOAPException if the {@code QName} cannot be created. |
12009 | 352 |
* |
25840 | 353 |
* @since 1.6, SAAJ 1.3 |
12009 | 354 |
*/ |
355 |
public QName createQName(String localName, String prefix) |
|
356 |
throws SOAPException; |
|
357 |
/** |
|
30005 | 358 |
* Returns the name of this {@code SOAPElement} object. |
12009 | 359 |
* |
30005 | 360 |
* @return a {@code Name} object with the name of this |
361 |
* {@code SOAPElement} object |
|
12009 | 362 |
*/ |
363 |
public Name getElementName(); |
|
364 |
||
365 |
/** |
|
30005 | 366 |
* Returns the qname of this {@code SOAPElement} object. |
12009 | 367 |
* |
30005 | 368 |
* @return a {@code QName} object with the qname of this |
369 |
* {@code SOAPElement} object |
|
12009 | 370 |
* @see SOAPElement#getElementName() |
25840 | 371 |
* @since 1.6, SAAJ 1.3 |
12009 | 372 |
*/ |
373 |
public QName getElementQName(); |
|
374 |
||
375 |
/** |
|
30005 | 376 |
* Changes the name of this {@code Element} to {@code newName} if |
12009 | 377 |
* possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody |
378 |
* etc. cannot have their names changed using this method. Any attempt to do |
|
379 |
* so will result in a SOAPException being thrown. |
|
380 |
*<P> |
|
381 |
* Callers should not rely on the element instance being renamed as is. |
|
382 |
* Implementations could end up copying the content of the |
|
30005 | 383 |
* {@code SOAPElement} to a renamed instance. |
12009 | 384 |
* |
30005 | 385 |
* @param newName the new name for the {@code Element}. |
12009 | 386 |
* |
30005 | 387 |
* @exception SOAPException if changing the name of this {@code Element} |
12009 | 388 |
* is not allowed. |
389 |
* @return The renamed Node |
|
390 |
* |
|
25840 | 391 |
* @since 1.6, SAAJ 1.3 |
12009 | 392 |
*/ |
393 |
public SOAPElement setElementQName(QName newName) throws SOAPException; |
|
394 |
||
395 |
/** |
|
396 |
* Removes the attribute with the specified name. |
|
397 |
* |
|
30005 | 398 |
* @param name the {@code Name} object with the name of the |
12009 | 399 |
* attribute to be removed |
30005 | 400 |
* @return {@code true} if the attribute was |
401 |
* removed successfully; {@code false} if it was not |
|
12009 | 402 |
* @see SOAPElement#removeAttribute(javax.xml.namespace.QName) |
403 |
*/ |
|
404 |
public boolean removeAttribute(Name name); |
|
405 |
||
406 |
/** |
|
407 |
* Removes the attribute with the specified qname. |
|
408 |
* |
|
30005 | 409 |
* @param qname the {@code QName} object with the qname of the |
12009 | 410 |
* attribute to be removed |
30005 | 411 |
* @return {@code true} if the attribute was |
412 |
* removed successfully; {@code false} if it was not |
|
12009 | 413 |
* @see SOAPElement#removeAttribute(Name) |
25840 | 414 |
* @since 1.6, SAAJ 1.3 |
12009 | 415 |
*/ |
416 |
public boolean removeAttribute(QName qname); |
|
417 |
||
418 |
/** |
|
419 |
* Removes the namespace declaration corresponding to the given prefix. |
|
420 |
* |
|
30005 | 421 |
* @param prefix a {@code String} giving the prefix for which |
12009 | 422 |
* to search |
30005 | 423 |
* @return {@code true} if the namespace declaration was |
424 |
* removed successfully; {@code false} if it was not |
|
12009 | 425 |
*/ |
426 |
public boolean removeNamespaceDeclaration(String prefix); |
|
427 |
||
428 |
/** |
|
30005 | 429 |
* Returns an {@code Iterator} over all the immediate child |
430 |
* {@link Node}s of this element. This includes {@code javax.xml.soap.Text} |
|
431 |
* objects as well as {@code SOAPElement} objects. |
|
12009 | 432 |
* <p> |
30005 | 433 |
* Calling this method may cause child {@code Element}, |
434 |
* {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be |
|
435 |
* replaced by {@code SOAPElement}, {@code SOAPHeaderElement}, |
|
436 |
* {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as |
|
12009 | 437 |
* appropriate for the type of this parent node. As a result the calling |
438 |
* application must treat any existing references to these child nodes that |
|
439 |
* have been obtained through DOM APIs as invalid and either discard them or |
|
30005 | 440 |
* refresh them with the values returned by this {@code Iterator}. This |
12009 | 441 |
* behavior can be avoided by calling the equivalent DOM APIs. See |
30005 | 442 |
* {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>} |
12009 | 443 |
* for more details. |
444 |
* |
|
30005 | 445 |
* @return an iterator with the content of this {@code SOAPElement} |
12009 | 446 |
* object |
447 |
*/ |
|
448 |
public Iterator getChildElements(); |
|
449 |
||
450 |
/** |
|
30005 | 451 |
* Returns an {@code Iterator} over all the immediate child |
12009 | 452 |
* {@link Node}s of this element with the specified name. All of these |
30005 | 453 |
* children will be {@code SOAPElement} nodes. |
12009 | 454 |
* <p> |
30005 | 455 |
* Calling this method may cause child {@code Element}, |
456 |
* {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be |
|
457 |
* replaced by {@code SOAPElement}, {@code SOAPHeaderElement}, |
|
458 |
* {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as |
|
12009 | 459 |
* appropriate for the type of this parent node. As a result the calling |
460 |
* application must treat any existing references to these child nodes that |
|
461 |
* have been obtained through DOM APIs as invalid and either discard them or |
|
30005 | 462 |
* refresh them with the values returned by this {@code Iterator}. This |
12009 | 463 |
* behavior can be avoided by calling the equivalent DOM APIs. See |
30005 | 464 |
* {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>} |
12009 | 465 |
* for more details. |
466 |
* |
|
30005 | 467 |
* @param name a {@code Name} object with the name of the child |
12009 | 468 |
* elements to be returned |
469 |
* |
|
30005 | 470 |
* @return an {@code Iterator} object over all the elements |
471 |
* in this {@code SOAPElement} object with the |
|
12009 | 472 |
* specified name |
473 |
* @see SOAPElement#getChildElements(javax.xml.namespace.QName) |
|
474 |
*/ |
|
475 |
public Iterator getChildElements(Name name); |
|
476 |
||
477 |
/** |
|
30005 | 478 |
* Returns an {@code Iterator} over all the immediate child |
12009 | 479 |
* {@link Node}s of this element with the specified qname. All of these |
30005 | 480 |
* children will be {@code SOAPElement} nodes. |
12009 | 481 |
* <p> |
30005 | 482 |
* Calling this method may cause child {@code Element}, |
483 |
* {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be |
|
484 |
* replaced by {@code SOAPElement}, {@code SOAPHeaderElement}, |
|
485 |
* {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as |
|
12009 | 486 |
* appropriate for the type of this parent node. As a result the calling |
487 |
* application must treat any existing references to these child nodes that |
|
488 |
* have been obtained through DOM APIs as invalid and either discard them or |
|
30005 | 489 |
* refresh them with the values returned by this {@code Iterator}. This |
12009 | 490 |
* behavior can be avoided by calling the equivalent DOM APIs. See |
30005 | 491 |
* {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>} |
12009 | 492 |
* for more details. |
493 |
* |
|
30005 | 494 |
* @param qname a {@code QName} object with the qname of the child |
12009 | 495 |
* elements to be returned |
496 |
* |
|
30005 | 497 |
* @return an {@code Iterator} object over all the elements |
498 |
* in this {@code SOAPElement} object with the |
|
12009 | 499 |
* specified qname |
500 |
* @see SOAPElement#getChildElements(Name) |
|
25840 | 501 |
* @since 1.6, SAAJ 1.3 |
12009 | 502 |
*/ |
503 |
public Iterator getChildElements(QName qname); |
|
504 |
||
505 |
/** |
|
30005 | 506 |
* Sets the encoding style for this {@code SOAPElement} object |
12009 | 507 |
* to one specified. |
508 |
* |
|
30005 | 509 |
* @param encodingStyle a {@code String} giving the encoding style |
12009 | 510 |
* |
511 |
* @exception IllegalArgumentException if there was a problem in the |
|
512 |
* encoding style being set. |
|
513 |
* @exception SOAPException if setting the encodingStyle is invalid for this SOAPElement. |
|
514 |
* @see #getEncodingStyle |
|
515 |
*/ |
|
516 |
public void setEncodingStyle(String encodingStyle) |
|
517 |
throws SOAPException; |
|
518 |
/** |
|
30005 | 519 |
* Returns the encoding style for this {@code SOAPElement} object. |
12009 | 520 |
* |
30005 | 521 |
* @return a {@code String} giving the encoding style |
12009 | 522 |
* |
523 |
* @see #setEncodingStyle |
|
524 |
*/ |
|
525 |
public String getEncodingStyle(); |
|
526 |
} |