Errors in SOAP should be returned as SOAP Faults. A SOAP Fault contains specific information detailing the reason for the Fault.


<?xml version="1.0"?>
<Fault>
 <faultcode xsi:type="xsd:QName">
  SOAP-ENV:Client
 </faultcode>  
 <faultstring xsi:type="xsd:string">
  You sent an empty string
 </faultstring>        
 <faultactor xsi:type="xsd:anyURI">
  urn:SOAP_Example_Server
 </faultactor>
 <detail xsi:type="xsd:string"/>        
</Fault>
Faults can be of four basic types: VersionMismatch, MustUnderstand, Client and Server:

Faults can also contain other information, such as a basic message describing the fault, the URI of the originator of the fault, and a detail field that can be used to provide additional information on the fault.