SOAP Faults
SOAP messages are XML-based, and the SOAP protocol defines a SOAP Fault element for returning remote errors to the caller.
| Element | Description |
|---|---|
<faultcode>
|
Code that identifies the fault |
<faultstring>
|
A human readable explanation of the fault |
<faultactor>
|
Information about where the error was detected |
<detail>
|
Application-specific error information related to the execution of the requested web service |
For detailed descriptions of the SOAP Fault elements, consult the Simple Object Access Protocol (SOAP) 1.1.
If a SOAP fault is returned from a web service, the SOAP connector receives the fault and interprets it.
SOAP Fault
The following XML shows an example of a SOAP fault.:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
<soapenv:Body>
<soapenv:Fault>
<faultcode xmlns:fc="http://faultcodes.org/">fc:Server</faultcode>
<faultstring xml:lang="en-GB">Bad error in server!</faultstring>
<detail>
<de1:detail1 xmlns:de1="http://detail1.error/">
<message>Application-specific error 1</message>
<e:error xmlns:e="http://empty.error/" />
</de1:detail1>
<de2:detail2 xmlns:de2="http://detail2.error/">
<message>
<e:error xmlns:e="http://another.error/">
Application-specific error 2
</e:error>
</message>
</de2:detail2>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
As the example demonstrates, the structure of the detail element is application-specific.