src/share/jaxws_classes/javax/xml/soap/SOAPFault.java

Tue, 06 Mar 2012 16:09:35 -0800

author
ohair
date
Tue, 06 Mar 2012 16:09:35 -0800
changeset 286
f50545b5e2f1
child 368
0989ad8c0860
permissions
-rw-r--r--

7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom

ohair@286 1 /*
ohair@286 2 * Copyright (c) 2004, 2011, 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 javax.xml.soap;
ohair@286 27
ohair@286 28 import java.util.Iterator;
ohair@286 29 import java.util.Locale;
ohair@286 30
ohair@286 31 import javax.xml.namespace.QName;
ohair@286 32
ohair@286 33 /**
ohair@286 34 * An element in the <code>SOAPBody</code> object that contains
ohair@286 35 * error and/or status information. This information may relate to
ohair@286 36 * errors in the <code>SOAPMessage</code> object or to problems
ohair@286 37 * that are not related to the content in the message itself. Problems
ohair@286 38 * not related to the message itself are generally errors in
ohair@286 39 * processing, such as the inability to communicate with an upstream
ohair@286 40 * server.
ohair@286 41 * <P>
ohair@286 42 * Depending on the <code>protocol</code> specified while creating the
ohair@286 43 * <code>MessageFactory</code> instance, a <code>SOAPFault</code> has
ohair@286 44 * sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.
ohair@286 45 */
ohair@286 46 public interface SOAPFault extends SOAPBodyElement {
ohair@286 47
ohair@286 48 /**
ohair@286 49 * Sets this <code>SOAPFault</code> object with the given fault code.
ohair@286 50 *
ohair@286 51 * <P> Fault codes, which give information about the fault, are defined
ohair@286 52 * in the SOAP 1.1 specification. A fault code is mandatory and must
ohair@286 53 * be of type <code>Name</code>. This method provides a convenient
ohair@286 54 * way to set a fault code. For example,
ohair@286 55 *
ohair@286 56 * <PRE>
ohair@286 57 * SOAPEnvelope se = ...;
ohair@286 58 * // Create a qualified name in the SOAP namespace with a localName
ohair@286 59 * // of "Client". Note that prefix parameter is optional and is null
ohair@286 60 * // here which causes the implementation to use an appropriate prefix.
ohair@286 61 * Name qname = se.createName("Client", null,
ohair@286 62 * SOAPConstants.URI_NS_SOAP_ENVELOPE);
ohair@286 63 * SOAPFault fault = ...;
ohair@286 64 * fault.setFaultCode(qname);
ohair@286 65 * </PRE>
ohair@286 66 * It is preferable to use this method over {@link #setFaultCode(String)}.
ohair@286 67 *
ohair@286 68 * @param faultCodeQName a <code>Name</code> object giving the fault
ohair@286 69 * code to be set. It must be namespace qualified.
ohair@286 70 * @see #getFaultCodeAsName
ohair@286 71 *
ohair@286 72 * @exception SOAPException if there was an error in adding the
ohair@286 73 * <i>faultcode</i> element to the underlying XML tree.
ohair@286 74 *
ohair@286 75 * @since SAAJ 1.2
ohair@286 76 */
ohair@286 77 public void setFaultCode(Name faultCodeQName) throws SOAPException;
ohair@286 78
ohair@286 79 /**
ohair@286 80 * Sets this <code>SOAPFault</code> object with the given fault code.
ohair@286 81 *
ohair@286 82 * It is preferable to use this method over {@link #setFaultCode(Name)}.
ohair@286 83 *
ohair@286 84 * @param faultCodeQName a <code>QName</code> object giving the fault
ohair@286 85 * code to be set. It must be namespace qualified.
ohair@286 86 * @see #getFaultCodeAsQName
ohair@286 87 *
ohair@286 88 * @exception SOAPException if there was an error in adding the
ohair@286 89 * <code>faultcode</code> element to the underlying XML tree.
ohair@286 90 *
ohair@286 91 * @see #setFaultCode(Name)
ohair@286 92 * @see #getFaultCodeAsQName()
ohair@286 93 *
ohair@286 94 * @since SAAJ 1.3
ohair@286 95 */
ohair@286 96 public void setFaultCode(QName faultCodeQName) throws SOAPException;
ohair@286 97
ohair@286 98 /**
ohair@286 99 * Sets this <code>SOAPFault</code> object with the give fault code.
ohair@286 100 * <P>
ohair@286 101 * Fault codes, which given information about the fault, are defined in
ohair@286 102 * the SOAP 1.1 specification. This element is mandatory in SOAP 1.1.
ohair@286 103 * Because the fault code is required to be a QName it is preferable to
ohair@286 104 * use the {@link #setFaultCode(Name)} form of this method.
ohair@286 105 *
ohair@286 106 * @param faultCode a <code>String</code> giving the fault code to be set.
ohair@286 107 * It must be of the form "prefix:localName" where the prefix has
ohair@286 108 * been defined in a namespace declaration.
ohair@286 109 * @see #setFaultCode(Name)
ohair@286 110 * @see #getFaultCode
ohair@286 111 * @see SOAPElement#addNamespaceDeclaration
ohair@286 112 *
ohair@286 113 * @exception SOAPException if there was an error in adding the
ohair@286 114 * <code>faultCode</code> to the underlying XML tree.
ohair@286 115 */
ohair@286 116 public void setFaultCode(String faultCode) throws SOAPException;
ohair@286 117
ohair@286 118 /**
ohair@286 119 * Gets the mandatory SOAP 1.1 fault code for this
ohair@286 120 * <code>SOAPFault</code> object as a SAAJ <code>Name</code> object.
ohair@286 121 * The SOAP 1.1 specification requires the value of the "faultcode"
ohair@286 122 * element to be of type QName. This method returns the content of the
ohair@286 123 * element as a QName in the form of a SAAJ Name object. This method
ohair@286 124 * should be used instead of the <code>getFaultCode</code> method since
ohair@286 125 * it allows applications to easily access the namespace name without
ohair@286 126 * additional parsing.
ohair@286 127 *
ohair@286 128 * @return a <code>Name</code> representing the faultcode
ohair@286 129 * @see #setFaultCode(Name)
ohair@286 130 *
ohair@286 131 * @since SAAJ 1.2
ohair@286 132 */
ohair@286 133 public Name getFaultCodeAsName();
ohair@286 134
ohair@286 135
ohair@286 136 /**
ohair@286 137 * Gets the fault code for this
ohair@286 138 * <code>SOAPFault</code> object as a <code>QName</code> object.
ohair@286 139 *
ohair@286 140 * @return a <code>QName</code> representing the faultcode
ohair@286 141 *
ohair@286 142 * @see #setFaultCode(QName)
ohair@286 143 *
ohair@286 144 * @since SAAJ 1.3
ohair@286 145 */
ohair@286 146 public QName getFaultCodeAsQName();
ohair@286 147
ohair@286 148 /**
ohair@286 149 * Gets the Subcodes for this <code>SOAPFault</code> as an iterator over
ohair@286 150 * <code>QNames</code>.
ohair@286 151 *
ohair@286 152 * @return an <code>Iterator</code> that accesses a sequence of
ohair@286 153 * <code>QNames</code>. This <code>Iterator</code> should not support
ohair@286 154 * the optional <code>remove</code> method. The order in which the
ohair@286 155 * Subcodes are returned reflects the hierarchy of Subcodes present
ohair@286 156 * in the fault from top to bottom.
ohair@286 157 *
ohair@286 158 * @exception UnsupportedOperationException if this message does not
ohair@286 159 * support the SOAP 1.2 concept of Subcode.
ohair@286 160 *
ohair@286 161 * @since SAAJ 1.3
ohair@286 162 */
ohair@286 163 public Iterator getFaultSubcodes();
ohair@286 164
ohair@286 165 /**
ohair@286 166 * Removes any Subcodes that may be contained by this
ohair@286 167 * <code>SOAPFault</code>. Subsequent calls to
ohair@286 168 * <code>getFaultSubcodes</code> will return an empty iterator until a call
ohair@286 169 * to <code>appendFaultSubcode</code> is made.
ohair@286 170 *
ohair@286 171 * @exception UnsupportedOperationException if this message does not
ohair@286 172 * support the SOAP 1.2 concept of Subcode.
ohair@286 173 *
ohair@286 174 * @since SAAJ 1.3
ohair@286 175 */
ohair@286 176 public void removeAllFaultSubcodes();
ohair@286 177
ohair@286 178 /**
ohair@286 179 * Adds a Subcode to the end of the sequence of Subcodes contained by this
ohair@286 180 * <code>SOAPFault</code>. Subcodes, which were introduced in SOAP 1.2, are
ohair@286 181 * represented by a recursive sequence of subelements rooted in the
ohair@286 182 * mandatory Code subelement of a SOAP Fault.
ohair@286 183 *
ohair@286 184 * @param subcode a QName containing the Value of the Subcode.
ohair@286 185 *
ohair@286 186 * @exception SOAPException if there was an error in setting the Subcode
ohair@286 187 * @exception UnsupportedOperationException if this message does not
ohair@286 188 * support the SOAP 1.2 concept of Subcode.
ohair@286 189 *
ohair@286 190 * @since SAAJ 1.3
ohair@286 191 */
ohair@286 192 public void appendFaultSubcode(QName subcode) throws SOAPException;
ohair@286 193
ohair@286 194 /**
ohair@286 195 * Gets the fault code for this <code>SOAPFault</code> object.
ohair@286 196 *
ohair@286 197 * @return a <code>String</code> with the fault code
ohair@286 198 * @see #getFaultCodeAsName
ohair@286 199 * @see #setFaultCode
ohair@286 200 */
ohair@286 201 public String getFaultCode();
ohair@286 202
ohair@286 203 /**
ohair@286 204 * Sets this <code>SOAPFault</code> object with the given fault actor.
ohair@286 205 * <P>
ohair@286 206 * The fault actor is the recipient in the message path who caused the
ohair@286 207 * fault to happen.
ohair@286 208 * <P>
ohair@286 209 * If this <code>SOAPFault</code> supports SOAP 1.2 then this call is
ohair@286 210 * equivalent to {@link #setFaultRole(String)}
ohair@286 211 *
ohair@286 212 * @param faultActor a <code>String</code> identifying the actor that
ohair@286 213 * caused this <code>SOAPFault</code> object
ohair@286 214 * @see #getFaultActor
ohair@286 215 *
ohair@286 216 * @exception SOAPException if there was an error in adding the
ohair@286 217 * <code>faultActor</code> to the underlying XML tree.
ohair@286 218 */
ohair@286 219 public void setFaultActor(String faultActor) throws SOAPException;
ohair@286 220
ohair@286 221 /**
ohair@286 222 * Gets the fault actor for this <code>SOAPFault</code> object.
ohair@286 223 * <P>
ohair@286 224 * If this <code>SOAPFault</code> supports SOAP 1.2 then this call is
ohair@286 225 * equivalent to {@link #getFaultRole()}
ohair@286 226 *
ohair@286 227 * @return a <code>String</code> giving the actor in the message path
ohair@286 228 * that caused this <code>SOAPFault</code> object
ohair@286 229 * @see #setFaultActor
ohair@286 230 */
ohair@286 231 public String getFaultActor();
ohair@286 232
ohair@286 233 /**
ohair@286 234 * Sets the fault string for this <code>SOAPFault</code> object
ohair@286 235 * to the given string.
ohair@286 236 * <P>
ohair@286 237 * If this
ohair@286 238 * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
ohair@286 239 * this call is equivalent to:
ohair@286 240 * <pre>
ohair@286 241 * addFaultReasonText(faultString, Locale.getDefault());
ohair@286 242 * </pre>
ohair@286 243 *
ohair@286 244 * @param faultString a <code>String</code> giving an explanation of
ohair@286 245 * the fault
ohair@286 246 * @see #getFaultString
ohair@286 247 *
ohair@286 248 * @exception SOAPException if there was an error in adding the
ohair@286 249 * <code>faultString</code> to the underlying XML tree.
ohair@286 250 */
ohair@286 251 public void setFaultString(String faultString) throws SOAPException;
ohair@286 252
ohair@286 253 /**
ohair@286 254 * Sets the fault string for this <code>SOAPFault</code> object
ohair@286 255 * to the given string and localized to the given locale.
ohair@286 256 * <P>
ohair@286 257 * If this
ohair@286 258 * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
ohair@286 259 * this call is equivalent to:
ohair@286 260 * <pre>
ohair@286 261 * addFaultReasonText(faultString, locale);
ohair@286 262 * </pre>
ohair@286 263 *
ohair@286 264 * @param faultString a <code>String</code> giving an explanation of
ohair@286 265 * the fault
ohair@286 266 * @param locale a {@link java.util.Locale Locale} object indicating
ohair@286 267 * the native language of the <code>faultString</code>
ohair@286 268 * @see #getFaultString
ohair@286 269 *
ohair@286 270 * @exception SOAPException if there was an error in adding the
ohair@286 271 * <code>faultString</code> to the underlying XML tree.
ohair@286 272 *
ohair@286 273 * @since SAAJ 1.2
ohair@286 274 */
ohair@286 275 public void setFaultString(String faultString, Locale locale)
ohair@286 276 throws SOAPException;
ohair@286 277
ohair@286 278 /**
ohair@286 279 * Gets the fault string for this <code>SOAPFault</code> object.
ohair@286 280 * <P>
ohair@286 281 * If this
ohair@286 282 * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
ohair@286 283 * this call is equivalent to:
ohair@286 284 * <pre>
ohair@286 285 * String reason = null;
ohair@286 286 * try {
ohair@286 287 * reason = (String) getFaultReasonTexts().next();
ohair@286 288 * } catch (SOAPException e) {}
ohair@286 289 * return reason;
ohair@286 290 * </pre>
ohair@286 291 *
ohair@286 292 * @return a <code>String</code> giving an explanation of
ohair@286 293 * the fault
ohair@286 294 * @see #setFaultString(String)
ohair@286 295 * @see #setFaultString(String, Locale)
ohair@286 296 */
ohair@286 297 public String getFaultString();
ohair@286 298
ohair@286 299 /**
ohair@286 300 * Gets the locale of the fault string for this <code>SOAPFault</code>
ohair@286 301 * object.
ohair@286 302 * <P>
ohair@286 303 * If this
ohair@286 304 * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
ohair@286 305 * this call is equivalent to:
ohair@286 306 * <pre>
ohair@286 307 * Locale locale = null;
ohair@286 308 * try {
ohair@286 309 * locale = (Locale) getFaultReasonLocales().next();
ohair@286 310 * } catch (SOAPException e) {}
ohair@286 311 * return locale;
ohair@286 312 * </pre>
ohair@286 313 *
ohair@286 314 * @return a <code>Locale</code> object indicating the native language of
ohair@286 315 * the fault string or <code>null</code> if no locale was specified
ohair@286 316 * @see #setFaultString(String, Locale)
ohair@286 317 *
ohair@286 318 * @since SAAJ 1.2
ohair@286 319 */
ohair@286 320 public Locale getFaultStringLocale();
ohair@286 321
ohair@286 322 /**
ohair@286 323 * Returns true if this <code>SOAPFault</code> has a <code>Detail</code>
ohair@286 324 * subelement and false otherwise. Equivalent to
ohair@286 325 * <code>(getDetail()!=null)</code>.
ohair@286 326 *
ohair@286 327 * @return true if this <code>SOAPFault</code> has a <code>Detail</code>
ohair@286 328 * subelement and false otherwise.
ohair@286 329 *
ohair@286 330 * @since SAAJ 1.3
ohair@286 331 */
ohair@286 332 public boolean hasDetail();
ohair@286 333
ohair@286 334 /**
ohair@286 335 * Returns the optional detail element for this <code>SOAPFault</code>
ohair@286 336 * object.
ohair@286 337 * <P>
ohair@286 338 * A <code>Detail</code> object carries application-specific error
ohair@286 339 * information, the scope of the error information is restricted to
ohair@286 340 * faults in the <code>SOAPBodyElement</code> objects if this is a
ohair@286 341 * SOAP 1.1 Fault.
ohair@286 342 *
ohair@286 343 * @return a <code>Detail</code> object with application-specific
ohair@286 344 * error information if present, null otherwise
ohair@286 345 */
ohair@286 346 public Detail getDetail();
ohair@286 347
ohair@286 348 /**
ohair@286 349 * Creates an optional <code>Detail</code> object and sets it as the
ohair@286 350 * <code>Detail</code> object for this <code>SOAPFault</code>
ohair@286 351 * object.
ohair@286 352 * <P>
ohair@286 353 * It is illegal to add a detail when the fault already
ohair@286 354 * contains a detail. Therefore, this method should be called
ohair@286 355 * only after the existing detail has been removed.
ohair@286 356 *
ohair@286 357 * @return the new <code>Detail</code> object
ohair@286 358 *
ohair@286 359 * @exception SOAPException if this
ohair@286 360 * <code>SOAPFault</code> object already contains a
ohair@286 361 * valid <code>Detail</code> object
ohair@286 362 */
ohair@286 363 public Detail addDetail() throws SOAPException;
ohair@286 364
ohair@286 365 /**
ohair@286 366 * Returns an <code>Iterator</code> over a distinct sequence of
ohair@286 367 * <code>Locale</code>s for which there are associated Reason Text items.
ohair@286 368 * Any of these <code>Locale</code>s can be used in a call to
ohair@286 369 * <code>getFaultReasonText</code> in order to obtain a localized version
ohair@286 370 * of the Reason Text string.
ohair@286 371 *
ohair@286 372 * @return an <code>Iterator</code> over a sequence of <code>Locale</code>
ohair@286 373 * objects for which there are associated Reason Text items.
ohair@286 374 *
ohair@286 375 * @exception SOAPException if there was an error in retrieving
ohair@286 376 * the fault Reason locales.
ohair@286 377 * @exception UnsupportedOperationException if this message does not
ohair@286 378 * support the SOAP 1.2 concept of Fault Reason.
ohair@286 379 *
ohair@286 380 * @since SAAJ 1.3
ohair@286 381 */
ohair@286 382 public Iterator getFaultReasonLocales() throws SOAPException;
ohair@286 383
ohair@286 384 /**
ohair@286 385 * Returns an <code>Iterator</code> over a sequence of
ohair@286 386 * <code>String</code> objects containing all of the Reason Text items for
ohair@286 387 * this <code>SOAPFault</code>.
ohair@286 388 *
ohair@286 389 * @return an <code>Iterator</code> over env:Fault/env:Reason/env:Text items.
ohair@286 390 *
ohair@286 391 * @exception SOAPException if there was an error in retrieving
ohair@286 392 * the fault Reason texts.
ohair@286 393 * @exception UnsupportedOperationException if this message does not
ohair@286 394 * support the SOAP 1.2 concept of Fault Reason.
ohair@286 395 *
ohair@286 396 * @since SAAJ 1.3
ohair@286 397 */
ohair@286 398 public Iterator getFaultReasonTexts() throws SOAPException;
ohair@286 399
ohair@286 400 /**
ohair@286 401 * Returns the Reason Text associated with the given <code>Locale</code>.
ohair@286 402 * If more than one such Reason Text exists the first matching Text is
ohair@286 403 * returned
ohair@286 404 *
ohair@286 405 * @param locale -- the <code>Locale</code> for which a localized
ohair@286 406 * Reason Text is desired
ohair@286 407 *
ohair@286 408 * @return the Reason Text associated with <code>locale</code>
ohair@286 409 *
ohair@286 410 * @see #getFaultString
ohair@286 411 *
ohair@286 412 * @exception SOAPException if there was an error in retrieving
ohair@286 413 * the fault Reason text for the specified locale .
ohair@286 414 * @exception UnsupportedOperationException if this message does not
ohair@286 415 * support the SOAP 1.2 concept of Fault Reason.
ohair@286 416 *
ohair@286 417 * @since SAAJ 1.3
ohair@286 418 */
ohair@286 419 public String getFaultReasonText(Locale locale) throws SOAPException;
ohair@286 420
ohair@286 421 /**
ohair@286 422 * Appends or replaces a Reason Text item containing the specified
ohair@286 423 * text message and an <i>xml:lang</i> derived from
ohair@286 424 * <code>locale</code>. If a Reason Text item with this
ohair@286 425 * <i>xml:lang</i> already exists its text value will be replaced
ohair@286 426 * with <code>text</code>.
ohair@286 427 * The <code>locale</code> parameter should not be <code>null</code>
ohair@286 428 * <P>
ohair@286 429 * Code sample:
ohair@286 430 *
ohair@286 431 * <PRE>
ohair@286 432 * SOAPFault fault = ...;
ohair@286 433 * fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH);
ohair@286 434 * </PRE>
ohair@286 435 *
ohair@286 436 * @param text -- reason message string
ohair@286 437 * @param locale -- Locale object representing the locale of the message
ohair@286 438 *
ohair@286 439 * @exception SOAPException if there was an error in adding the Reason text
ohair@286 440 * or the <code>locale</code> passed was <code>null</code>.
ohair@286 441 * @exception UnsupportedOperationException if this message does not
ohair@286 442 * support the SOAP 1.2 concept of Fault Reason.
ohair@286 443 *
ohair@286 444 * @since SAAJ 1.3
ohair@286 445 */
ohair@286 446 public void addFaultReasonText(String text, java.util.Locale locale)
ohair@286 447 throws SOAPException;
ohair@286 448
ohair@286 449 /**
ohair@286 450 * Returns the optional Node element value for this
ohair@286 451 * <code>SOAPFault</code> object. The Node element is
ohair@286 452 * optional in SOAP 1.2.
ohair@286 453 *
ohair@286 454 * @return Content of the env:Fault/env:Node element as a String
ohair@286 455 * or <code>null</code> if none
ohair@286 456 *
ohair@286 457 * @exception UnsupportedOperationException if this message does not
ohair@286 458 * support the SOAP 1.2 concept of Fault Node.
ohair@286 459 *
ohair@286 460 * @since SAAJ 1.3
ohair@286 461 */
ohair@286 462 public String getFaultNode();
ohair@286 463
ohair@286 464 /**
ohair@286 465 * Creates or replaces any existing Node element value for
ohair@286 466 * this <code>SOAPFault</code> object. The Node element
ohair@286 467 * is optional in SOAP 1.2.
ohair@286 468 *
ohair@286 469 * @exception SOAPException if there was an error in setting the
ohair@286 470 * Node for this <code>SOAPFault</code> object.
ohair@286 471 * @exception UnsupportedOperationException if this message does not
ohair@286 472 * support the SOAP 1.2 concept of Fault Node.
ohair@286 473 *
ohair@286 474 *
ohair@286 475 * @since SAAJ 1.3
ohair@286 476 */
ohair@286 477 public void setFaultNode(String uri) throws SOAPException;
ohair@286 478
ohair@286 479 /**
ohair@286 480 * Returns the optional Role element value for this
ohair@286 481 * <code>SOAPFault</code> object. The Role element is
ohair@286 482 * optional in SOAP 1.2.
ohair@286 483 *
ohair@286 484 * @return Content of the env:Fault/env:Role element as a String
ohair@286 485 * or <code>null</code> if none
ohair@286 486 *
ohair@286 487 * @exception UnsupportedOperationException if this message does not
ohair@286 488 * support the SOAP 1.2 concept of Fault Role.
ohair@286 489 *
ohair@286 490 * @since SAAJ 1.3
ohair@286 491 */
ohair@286 492 public String getFaultRole();
ohair@286 493
ohair@286 494 /**
ohair@286 495 * Creates or replaces any existing Role element value for
ohair@286 496 * this <code>SOAPFault</code> object. The Role element
ohair@286 497 * is optional in SOAP 1.2.
ohair@286 498 *
ohair@286 499 * @param uri - the URI of the Role
ohair@286 500 *
ohair@286 501 * @exception SOAPException if there was an error in setting the
ohair@286 502 * Role for this <code>SOAPFault</code> object.
ohair@286 503 *
ohair@286 504 * @exception UnsupportedOperationException if this message does not
ohair@286 505 * support the SOAP 1.2 concept of Fault Role.
ohair@286 506 *
ohair@286 507 * @since SAAJ 1.3
ohair@286 508 */
ohair@286 509 public void setFaultRole(String uri) throws SOAPException;
ohair@286 510
ohair@286 511 }

mercurial