Name
SOAPFault
Synopsis
public interface SOAPFault extends SOAPBodyElement {
// Public Instance Methods
public abstract Detail addDetail( ) throws SOAPException;
public abstract Detail getDetail( );
public abstract String getFaultActor( );
public abstract String getFaultCode( );
public abstract String getFaultString( );
public abstract void setFaultActor(String faultActor) throws SOAPException;
public abstract void setFaultCode(String faultCode) throws SOAPException;
public abstract void setFaultString(String faultString) throws SOAPException;
}SOAPFault is a subinterface of
SOAPBodyElement that is used to report an error
encountered while processing the body or headers of an earlier
message. A SOAPFault element can be created and
added to a message by calling the addFault( )
method of the SOAPBody element of the message.
Only one SOAPFault element may be present in a
SOAP message body; a SOAPException is thrown if an
attempt is made to add a second SOAPFault.
When created, a SOAPFault element is empty.
Application code should use SOAPFault methods to
add the following nested elements, as appropriate:
- Fault code
This mandatory element contains a value intended to be used by software to identify the cause of the error being reported. The SOAP specification defines a small number of standard fault codes that should be used where applicable. For further information on SOAP fault codes, refer to Chapter 6. The fault code is a string value that can be set using the
setFaultCode( )method ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access