1 /*
2 * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
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
145 *
146 * @since 1.6, SAAJ 1.3
147 */
148 public QName getFaultCodeAsQName();
149
150 /**
151 * Gets the Subcodes for this {@code SOAPFault} as an iterator over
152 * {@code QNames}.
153 *
154 * @return an {@code Iterator} that accesses a sequence of
155 * {@code QNames}. This {@code Iterator} should not support
156 * the optional {@code remove} method. The order in which the
157 * Subcodes are returned reflects the hierarchy of Subcodes present
158 * in the fault from top to bottom.
159 *
160 * @exception UnsupportedOperationException if this message does not
161 * support the SOAP 1.2 concept of Subcode.
162 *
163 * @since 1.6, SAAJ 1.3
164 */
165 public Iterator getFaultSubcodes();
166
167 /**
168 * Removes any Subcodes that may be contained by this
169 * {@code SOAPFault}. Subsequent calls to
170 * {@code getFaultSubcodes} will return an empty iterator until a call
171 * to {@code appendFaultSubcode} is made.
172 *
173 * @exception UnsupportedOperationException if this message does not
174 * support the SOAP 1.2 concept of Subcode.
175 *
176 * @since 1.6, SAAJ 1.3
177 */
178 public void removeAllFaultSubcodes();
179
180 /**
181 * Adds a Subcode to the end of the sequence of Subcodes contained by this
182 * {@code SOAPFault}. Subcodes, which were introduced in SOAP 1.2, are
183 * represented by a recursive sequence of subelements rooted in the
184 * mandatory Code subelement of a SOAP Fault.
185 *
364 */
365 public Detail addDetail() throws SOAPException;
366
367 /**
368 * Returns an {@code Iterator} over a distinct sequence of
369 * {@code Locale}s for which there are associated Reason Text items.
370 * Any of these {@code Locale}s can be used in a call to
371 * {@code getFaultReasonText} in order to obtain a localized version
372 * of the Reason Text string.
373 *
374 * @return an {@code Iterator} over a sequence of {@code Locale}
375 * objects for which there are associated Reason Text items.
376 *
377 * @exception SOAPException if there was an error in retrieving
378 * the fault Reason locales.
379 * @exception UnsupportedOperationException if this message does not
380 * support the SOAP 1.2 concept of Fault Reason.
381 *
382 * @since 1.6, SAAJ 1.3
383 */
384 public Iterator getFaultReasonLocales() throws SOAPException;
385
386 /**
387 * Returns an {@code Iterator} over a sequence of
388 * {@code String} objects containing all of the Reason Text items for
389 * this {@code SOAPFault}.
390 *
391 * @return an {@code Iterator} over env:Fault/env:Reason/env:Text items.
392 *
393 * @exception SOAPException if there was an error in retrieving
394 * the fault Reason texts.
395 * @exception UnsupportedOperationException if this message does not
396 * support the SOAP 1.2 concept of Fault Reason.
397 *
398 * @since 1.6, SAAJ 1.3
399 */
400 public Iterator getFaultReasonTexts() throws SOAPException;
401
402 /**
403 * Returns the Reason Text associated with the given {@code Locale}.
404 * If more than one such Reason Text exists the first matching Text is
405 * returned
406 *
407 * @param locale -- the {@code Locale} for which a localized
408 * Reason Text is desired
409 *
410 * @return the Reason Text associated with {@code locale}
411 *
412 * @see #getFaultString
413 *
414 * @exception SOAPException if there was an error in retrieving
415 * the fault Reason text for the specified locale .
416 * @exception UnsupportedOperationException if this message does not
417 * support the SOAP 1.2 concept of Fault Reason.
418 *
419 * @since 1.6, SAAJ 1.3
420 */
450
451 /**
452 * Returns the optional Node element value for this
453 * {@code SOAPFault} object. The Node element is
454 * optional in SOAP 1.2.
455 *
456 * @return Content of the env:Fault/env:Node element as a String
457 * or {@code null} if none
458 *
459 * @exception UnsupportedOperationException if this message does not
460 * support the SOAP 1.2 concept of Fault Node.
461 *
462 * @since 1.6, SAAJ 1.3
463 */
464 public String getFaultNode();
465
466 /**
467 * Creates or replaces any existing Node element value for
468 * this {@code SOAPFault} object. The Node element
469 * is optional in SOAP 1.2.
470 *
471 * @exception SOAPException if there was an error in setting the
472 * Node for this {@code SOAPFault} object.
473 * @exception UnsupportedOperationException if this message does not
474 * support the SOAP 1.2 concept of Fault Node.
475 *
476 *
477 * @since 1.6, SAAJ 1.3
478 */
479 public void setFaultNode(String uri) throws SOAPException;
480
481 /**
482 * Returns the optional Role element value for this
483 * {@code SOAPFault} object. The Role element is
484 * optional in SOAP 1.2.
485 *
486 * @return Content of the env:Fault/env:Role element as a String
487 * or {@code null} if none
488 *
489 * @exception UnsupportedOperationException if this message does not
|
1 /*
2 * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
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
145 *
146 * @since 1.6, SAAJ 1.3
147 */
148 public QName getFaultCodeAsQName();
149
150 /**
151 * Gets the Subcodes for this {@code SOAPFault} as an iterator over
152 * {@code QNames}.
153 *
154 * @return an {@code Iterator} that accesses a sequence of
155 * {@code QNames}. This {@code Iterator} should not support
156 * the optional {@code remove} method. The order in which the
157 * Subcodes are returned reflects the hierarchy of Subcodes present
158 * in the fault from top to bottom.
159 *
160 * @exception UnsupportedOperationException if this message does not
161 * support the SOAP 1.2 concept of Subcode.
162 *
163 * @since 1.6, SAAJ 1.3
164 */
165 public Iterator<QName> getFaultSubcodes();
166
167 /**
168 * Removes any Subcodes that may be contained by this
169 * {@code SOAPFault}. Subsequent calls to
170 * {@code getFaultSubcodes} will return an empty iterator until a call
171 * to {@code appendFaultSubcode} is made.
172 *
173 * @exception UnsupportedOperationException if this message does not
174 * support the SOAP 1.2 concept of Subcode.
175 *
176 * @since 1.6, SAAJ 1.3
177 */
178 public void removeAllFaultSubcodes();
179
180 /**
181 * Adds a Subcode to the end of the sequence of Subcodes contained by this
182 * {@code SOAPFault}. Subcodes, which were introduced in SOAP 1.2, are
183 * represented by a recursive sequence of subelements rooted in the
184 * mandatory Code subelement of a SOAP Fault.
185 *
364 */
365 public Detail addDetail() throws SOAPException;
366
367 /**
368 * Returns an {@code Iterator} over a distinct sequence of
369 * {@code Locale}s for which there are associated Reason Text items.
370 * Any of these {@code Locale}s can be used in a call to
371 * {@code getFaultReasonText} in order to obtain a localized version
372 * of the Reason Text string.
373 *
374 * @return an {@code Iterator} over a sequence of {@code Locale}
375 * objects for which there are associated Reason Text items.
376 *
377 * @exception SOAPException if there was an error in retrieving
378 * the fault Reason locales.
379 * @exception UnsupportedOperationException if this message does not
380 * support the SOAP 1.2 concept of Fault Reason.
381 *
382 * @since 1.6, SAAJ 1.3
383 */
384 public Iterator<Locale> getFaultReasonLocales() throws SOAPException;
385
386 /**
387 * Returns an {@code Iterator} over a sequence of
388 * {@code String} objects containing all of the Reason Text items for
389 * this {@code SOAPFault}.
390 *
391 * @return an {@code Iterator} over env:Fault/env:Reason/env:Text items.
392 *
393 * @exception SOAPException if there was an error in retrieving
394 * the fault Reason texts.
395 * @exception UnsupportedOperationException if this message does not
396 * support the SOAP 1.2 concept of Fault Reason.
397 *
398 * @since 1.6, SAAJ 1.3
399 */
400 public Iterator<String> getFaultReasonTexts() throws SOAPException;
401
402 /**
403 * Returns the Reason Text associated with the given {@code Locale}.
404 * If more than one such Reason Text exists the first matching Text is
405 * returned
406 *
407 * @param locale -- the {@code Locale} for which a localized
408 * Reason Text is desired
409 *
410 * @return the Reason Text associated with {@code locale}
411 *
412 * @see #getFaultString
413 *
414 * @exception SOAPException if there was an error in retrieving
415 * the fault Reason text for the specified locale .
416 * @exception UnsupportedOperationException if this message does not
417 * support the SOAP 1.2 concept of Fault Reason.
418 *
419 * @since 1.6, SAAJ 1.3
420 */
450
451 /**
452 * Returns the optional Node element value for this
453 * {@code SOAPFault} object. The Node element is
454 * optional in SOAP 1.2.
455 *
456 * @return Content of the env:Fault/env:Node element as a String
457 * or {@code null} if none
458 *
459 * @exception UnsupportedOperationException if this message does not
460 * support the SOAP 1.2 concept of Fault Node.
461 *
462 * @since 1.6, SAAJ 1.3
463 */
464 public String getFaultNode();
465
466 /**
467 * Creates or replaces any existing Node element value for
468 * this {@code SOAPFault} object. The Node element
469 * is optional in SOAP 1.2.
470 *
471 * @param uri - the URI of the Node
472 *
473 * @exception SOAPException if there was an error in setting the
474 * Node for this {@code SOAPFault} object.
475 * @exception UnsupportedOperationException if this message does not
476 * support the SOAP 1.2 concept of Fault Node.
477 *
478 *
479 * @since 1.6, SAAJ 1.3
480 */
481 public void setFaultNode(String uri) throws SOAPException;
482
483 /**
484 * Returns the optional Role element value for this
485 * {@code SOAPFault} object. The Role element is
486 * optional in SOAP 1.2.
487 *
488 * @return Content of the env:Fault/env:Role element as a String
489 * or {@code null} if none
490 *
491 * @exception UnsupportedOperationException if this message does not
|