All Implemented Interfaces:
SOAPBodyElement
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.
Method from javax.xml.soap.SOAPFault Summary: |
---|
addDetail, addFaultReasonText, appendFaultSubcode, getDetail, getFaultActor, getFaultCode, getFaultCodeAsName, getFaultCodeAsQName, getFaultNode, getFaultReasonLocales, getFaultReasonText, getFaultReasonTexts, getFaultRole, getFaultString, getFaultStringLocale, getFaultSubcodes, hasDetail, removeAllFaultSubcodes, setFaultActor, setFaultCode, setFaultCode, setFaultCode, setFaultNode, setFaultRole, setFaultString, setFaultString |
Method from javax.xml.soap.SOAPFault Detail: |
---|
Detail object and sets it as the
Detail object for this SOAPFault
object.
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. |
locale . If a Reason Text item with this
xml:lang already exists its text value will be replaced
with text .
The locale parameter should not be null
Code sample: SOAPFault fault = ...; fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH); |
SOAPFault . Subcodes, which were introduced in SOAP 1.2, are
represented by a recursive sequence of subelements rooted in the
mandatory Code subelement of a SOAP Fault. |
SOAPFault
object.
A |
SOAPFault object.
If this |
SOAPFault object. |
SOAPFault object as a SAAJ Name object.
The SOAP 1.1 specification requires the value of the "faultcode"
element to be of type QName. This method returns the content of the
element as a QName in the form of a SAAJ Name object. This method
should be used instead of the getFaultCode method since
it allows applications to easily access the namespace name without
additional parsing. |
SOAPFault object as a QName object. |
SOAPFault object. The Node element is
optional in SOAP 1.2. |
Iterator over a distinct sequence of
Locale s for which there are associated Reason Text items.
Any of these Locale s can be used in a call to
getFaultReasonText in order to obtain a localized version
of the Reason Text string. |
Locale .
If more than one such Reason Text exists the first matching Text is
returned |
Iterator over a sequence of
String objects containing all of the Reason Text items for
this SOAPFault . |
SOAPFault object. The Role element is
optional in SOAP 1.2. |
SOAPFault object.
If this
String reason = null; try { reason = (String) getFaultReasonTexts().next(); } catch (SOAPException e) {} return reason; |
SOAPFault
object.
If this
Locale locale = null; try { locale = (Locale) getFaultReasonLocales().next(); } catch (SOAPException e) {} return locale; |
SOAPFault as an iterator over
QNames . |
SOAPFault has a Detail
subelement and false otherwise. Equivalent to
(getDetail()!=null) . |
SOAPFault . Subsequent calls to
getFaultSubcodes will return an empty iterator until a call
to appendFaultSubcode is made. |
SOAPFault object with the given fault actor.
The fault actor is the recipient in the message path who caused the fault to happen.
If this |
SOAPFault object with the given fault code.
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 SOAPEnvelope se = ...; // Create a qualified name in the SOAP namespace with a localName // of "Client". Note that prefix parameter is optional and is null // here which causes the implementation to use an appropriate prefix. Name qname = se.createName("Client", null, SOAPConstants.URI_NS_SOAP_ENVELOPE); SOAPFault fault = ...; fault.setFaultCode(qname);It is preferable to use this method over #setFaultCode(String) . |
SOAPFault object with the given fault code.
It is preferable to use this method over #setFaultCode(Name) . |
SOAPFault object with the give fault code.
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 #setFaultCode(Name) form of this method. |
SOAPFault object. The Node element
is optional in SOAP 1.2. |
SOAPFault object. The Role element
is optional in SOAP 1.2. |
SOAPFault object
to the given string.
If this
addFaultReasonText(faultString, Locale.getDefault()); |
SOAPFault object
to the given string and localized to the given locale.
If this
addFaultReasonText(faultString, locale); |