7
* Contains information for a SOAP fault.
8
* Mainly used for returning faults from deployed functions
9
* in a server instance.
10
* @author Dietrich Ayala <dietrich@ganx4.com>
11
* @version $Id: class.soap_fault.php,v 1.14 2007/04/11 15:49:47 snichol Exp $
14
class nusoap_fault extends nusoap_base {
16
* The fault code (client|server)
28
* The fault string, a description of the fault
34
* The fault detail, typically a string or array of string
43
* @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server)
44
* @param string $faultactor only used when msg routed between multiple actors
45
* @param string $faultstring human readable error message
46
* @param mixed $faultdetail detail, typically a string or array of string
48
function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
49
parent::nusoap_base();
50
$this->faultcode = $faultcode;
51
$this->faultactor = $faultactor;
52
$this->faultstring = $faultstring;
53
$this->faultdetail = $faultdetail;
59
* @return string The serialization of the fault instance.
64
foreach($this->namespaces as $k => $v){
65
$ns_string .= "\n xmlns:$k=\"$v\"";
68
'<?xml version="1.0" encoding="'.$this->soap_defencoding.'"?>'.
69
'<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"'.$ns_string.">\n".
72
$this->serialize_val($this->faultcode, 'faultcode').
73
$this->serialize_val($this->faultactor, 'faultactor').
74
$this->serialize_val($this->faultstring, 'faultstring').
75
$this->serialize_val($this->faultdetail, 'detail').
78
'</SOAP-ENV:Envelope>';
84
* Backward compatibility
86
class soap_fault extends nusoap_fault {
b'\\ No newline at end of file'