public class SOAPFaultException extends RuntimeException {
// Public Constructors
public SOAPFaultException( javax.xml.namespace.QName faultcode,
String faultstring, String faultactor, javax.xml.soap.Detail faultdetail);
// Public Instance Methods
public javax.xml.soap.Detail getDetail( );
public String getFaultActor( );
public javax.xml.namespace.QName getFaultCode( );
public String getFaultString( );
}
SOAPFaultException is an unchecked exception that
is thrown from a method call on the client side that results in the
server returning a SOAP message that contains a fault element. The
methods from which such a fault can be thrown are the
invoke( ) method of the Call
interface, and any method in the service endpoint interface of a web
service for which the WSDL definition allows the response to contain
a fault element.
The methods of SOAPFaultException allow the client
application to retrieve the information conveyed in the fault message
(for a discussion of this, refer to the description of the
SOAPFault element in the SAAJ API in Chapter 20). The getFaultCode( ) and
getFaultString( ) methods retrieve the reason for
the fault as an error code and a human-readable string, respectively,
while the getFaultActor( ) method returns a URI
that identifies the system that detected the fault. The
getDetail( ) returns additional information, which
is application-specific, that the sender stored in the SOAP fault
element. The value returned by this method is of type
javax.xml.soap.Detail (see Chapter 20) and can, therefore, contain arbitrary XML
elements.