An instance of CSOAPFault is usually passed to the ShowResponse method of a SOAP server, which
passes it to CSOAPResponse::payload. The latter can distinguish
the type of a response value: an error (a CSOAPFault instance),
or the data type. This allows to add SOAP server errors (CSOAPFault) to a server
response appropriately. All other data types are strictly encoded according to
the web service data type specification, or using
CXMLCreator::encodeValueLight.
Example
// Fragment of a SOAP server web service handler
$this->ShowResponse( $cserver, $functionName, $namespaceURI,
new CSOAPFault(
'Server Error',
'Method not found'
) );