SOAPException Reference

SOAPException has SOAPCode and SOAPDetail in its parameter list. All three are discussed below.

public SOAPException(final SOAPCode code, final String[] reason, final URI node, final URI role, final SOAPDetail<T> detail)

The parameters of type SOAPXXX map to subelements of SOAP faults. Some of the parameters are for future use.
Parameter Description
code Intended for use by software to provide an algorithmic mechanism for identifying the fault.
reason Provides a human readable explanation of the fault.
node A URI that identifies the SOAP node that generated the fault. Its absence implies that the first recipient of the message generated the fault.
role A URI identifying the source of the fault within the message path.
detail Carries application-specific error information related to the Body element. It must not be used to carry information about error information belonging to header entries. Detailed error information belonging to header entries must be carried within header entries.

public SOAPCode(final QName codeValue, final SOAPCode subcode)

The type of the code parameter of SOAPException. The structure of the code parameter is hierarchical. The top-level code is a base fault and must be understood by all SOAP nodes. Nested codeValues are application-specific, and represent further elaboration or refinement of the base fault.
Parameter Description
codeValue The Qname that identifies the code for the fault.
subcode An optional subcode. Each child subcode element has a mandatory codeValue and an optional subcode subelement to support application-specific codes.

public SOAPDetail(final Class<T> detailType, final T detail)

The type of the detail parameter of SOAPException.
Parameter Description
detailType Type of the detail data provided to the exception.
detail Detail data provided to the exception. For example: SOAPDetail<Element> soapDetail = new SOAPDetail<Element>(Element.class, (Element)domNode);