SOAPBody object that contains
error and/or status information. This information may relate to
errors in the SOAPMessage object or to problems
that are not related to the content in the message itself. Problems
not related to the message itself are generally errors in
processing, such as the inability to communicate with an upstream
server.
Depending on the protocol specified while creating the
MessageFactory instance, a SOAPFault has
sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.
| Modifier and Type | Method and Description |
|---|---|
| public Detail | Returns: the newDetail objectCreates an optional |
| public void | addFaultReasonText(String
-- reason message string text, Locale -- Locale object representing the locale of the message locale)Appends or replaces a Reason Text item containing the specified
text message and an xml:lang derived from
|
| public void | appendFaultSubcode(QName
a QName containing the Value of the Subcode. subcode)Adds a Subcode to the end of the sequence of Subcodes contained by this
|
| public Detail | Returns: aDetail object with application-specific
error information if present, null otherwiseReturns the optional detail element for this |
| public String | Returns: aString giving the actor in the message path
that caused this SOAPFault objectGets the fault actor for this |
| public String | |
| public Name | Returns: aName representing the faultcodeGets the mandatory SOAP 1.1 fault code for this
|
| public QName | Returns: aQName representing the faultcodeGets the fault code for this
|
| public String | Returns: Content of the env:Fault/env:Node element as a String ornull if noneReturns the optional Node element value for this
|
| public Iterator | Returns: anIterator over a sequence of Locale
objects for which there are associated Reason Text items.Returns an |
| public String | Returns: the Reason Text associated withlocale-- the locale)Locale for which a localized
Reason Text is desiredReturns the Reason Text associated with the given |
| public Iterator | Returns: anIterator over env:Fault/env:Reason/env:Text items.Returns an |
| public String | Returns: Content of the env:Fault/env:Role element as a String ornull if noneReturns the optional Role element value for this
|
| public String | Returns: aString giving an explanation of
the faultGets the fault string for this |
| public Locale | Returns: aLocale object indicating the native language of
the fault string or null if no locale was specifiedGets the locale of the fault string for this |
| public Iterator | Returns: anIterator that accesses a sequence of
QNames. This Iterator should not support
the optional remove method. The order in which the
Subcodes are returned reflects the hierarchy of Subcodes present
in the fault from top to bottom.Gets the Subcodes for this |
| public boolean | Returns: true if thisSOAPFault has a Detail
subelement and false otherwise.Returns true if this |
| public void | |
| public void | setFaultActor(String
a faultActor)String identifying the actor that
caused this SOAPFault objectSets this |
| public void | setFaultCode(Name
a faultCodeQName)Name object giving the fault
code to be set. It must be namespace qualified.Sets this |
| public void | setFaultCode(QName
a faultCodeQName)QName object giving the fault
code to be set. It must be namespace qualified.Sets this |
| public void | setFaultCode(String
a faultCode)String giving the fault code to be set.
It must be of the form "prefix:localName" where the prefix has
been defined in a namespace declaration.Sets this |
| public void | setFaultNode(String
the URI of the Node uri)Creates or replaces any existing Node element value for
this |
| public void | setFaultRole(String
the URI of the Role uri)Creates or replaces any existing Role element value for
this |
| public void | setFaultString(String
a faultString)String giving an explanation of
the faultSets the fault string for this |
| public void | setFaultString(String
a faultString, Locale String giving an explanation of
the faulta locale)Locale object indicating
the native language of the faultStringSets the fault string for this |
| addDetail | back to summary |
|---|---|
| public Detail addDetail() throws SOAPException Creates an optional It is illegal to add a detail when the fault already contains a detail. Therefore, this method should be called only after the existing detail has been removed.
| |
| addFaultReasonText | back to summary |
|---|---|
| public void addFaultReasonText(String text, Locale locale) throws SOAPException Appends or replaces a Reason Text item containing the specified
text message and an xml:lang derived from
Code sample:
| |
| appendFaultSubcode | back to summary |
|---|---|
| public void appendFaultSubcode(QName subcode) throws SOAPException Adds a Subcode to the end of the sequence of Subcodes contained by this
| |
| getDetail | back to summary |
|---|---|
| public Detail getDetail() Returns the optional detail element for this
A
| |
| getFaultActor | back to summary |
|---|---|
| public String getFaultActor() Gets the fault actor for this
If this
| |
| getFaultCode | back to summary |
|---|---|
| public String getFaultCode() Gets the fault code for this
| |
| getFaultCodeAsName | back to summary |
|---|---|
| public Name getFaultCodeAsName() Gets the mandatory SOAP 1.1 fault code for this
| |
| getFaultCodeAsQName | back to summary |
|---|---|
| public QName getFaultCodeAsQName() Gets the fault code for this
| |
| getFaultNode | back to summary |
|---|---|
| public String getFaultNode() Returns the optional Node element value for this
| |
| getFaultReasonLocales | back to summary |
|---|---|
| public Iterator Returns an
| |
| getFaultReasonText | back to summary |
|---|---|
| public String getFaultReasonText(Locale locale) throws SOAPException Returns the Reason Text associated with the given
| |
| getFaultReasonTexts | back to summary |
|---|---|
| public Iterator Returns an
| |
| getFaultRole | back to summary |
|---|---|
| public String getFaultRole() Returns the optional Role element value for this
| |
| getFaultString | back to summary |
|---|---|
| public String getFaultString() Gets the fault string for this
If this
| |
| getFaultStringLocale | back to summary |
|---|---|
| public Locale getFaultStringLocale() Gets the locale of the fault string for this
If this
| |
| getFaultSubcodes | back to summary |
|---|---|
| public Iterator Gets the Subcodes for this
| |
| hasDetail | back to summary |
|---|---|
| public boolean hasDetail() Returns true if this
| |
| removeAllFaultSubcodes | back to summary |
|---|---|
| public void removeAllFaultSubcodes() Removes any Subcodes that may be contained by this
| |
| setFaultActor | back to summary |
|---|---|
| public void setFaultActor(String faultActor) throws SOAPException Sets this The fault actor is the recipient in the message path who caused the fault to happen.
If this
| |
| setFaultCode | back to summary |
|---|---|
| public void setFaultCode(Name faultCodeQName) throws SOAPException Sets this Fault codes, which give information about the fault, are defined
in the SOAP 1.1 specification. A fault code is mandatory and must
be of type
It is preferable to use this method over setFaultCode(String).
| |
| setFaultCode | back to summary |
|---|---|
| public void setFaultCode(QName faultCodeQName) throws SOAPException Sets this
| |
| setFaultCode | back to summary |
|---|---|
| public void setFaultCode(String faultCode) throws SOAPException Sets this
Fault codes, which given information about the fault, are defined in
the SOAP 1.1 specification. This element is mandatory in SOAP 1.1.
Because the fault code is required to be a QName it is preferable to
use the
| |
| setFaultNode | back to summary |
|---|---|
| public void setFaultNode(String uri) throws SOAPException Creates or replaces any existing Node element value for
this
| |
| setFaultRole | back to summary |
|---|---|
| public void setFaultRole(String uri) throws SOAPException Creates or replaces any existing Role element value for
this
| |
| setFaultString | back to summary |
|---|---|
| public void setFaultString(String faultString) throws SOAPException Sets the fault string for this
If this
| |
| setFaultString | back to summary |
|---|---|
| public void setFaultString(String faultString, Locale locale) throws SOAPException Sets the fault string for this
If this
| |