class soap_fault in Salesforce Suite 5
Same name in this branch
- 5 includes/nusoap.php \soap_fault
- 5 includes/nusoap.orig.php \soap_fault
Same name and namespace in other branches
- 5.2 includes/nusoap.php \soap_fault
- 5.2 includes/nusoap.orig.php \soap_fault
Contains information for a SOAP fault. Mainly used for returning faults from deployed functions in a server instance. @author Dietrich Ayala <dietrich@ganx4.com> @access public
Hierarchy
- class \soap_fault extends \nusoap_base
Expanded class hierarchy of soap_fault
2 string references to 'soap_fault'
- soap_server::serialize_return in includes/
nusoap.php - * serializes the return value from a PHP function into a full SOAP Envelope * * The following fields are set by this function (when successful) * * responseSOAP * * This sets the fault field on error * * @access private
- soap_server::serialize_return in includes/
nusoap.orig.php - * serializes the return value from a PHP function into a full SOAP Envelope * * The following fields are set by this function (when successful) * * responseSOAP * * This sets the fault field on error * * @access private
File
- includes/
nusoap.orig.php, line 913
View source
class soap_fault extends nusoap_base {
/**
* The fault code (client|server)
* @var string
* @access private
*/
var $faultcode;
/**
* The fault actor
* @var string
* @access private
*/
var $faultactor;
/**
* The fault string, a description of the fault
* @var string
* @access private
*/
var $faultstring;
/**
* The fault detail, typically a string or array of string
* @var mixed
* @access private
*/
var $faultdetail;
/**
* constructor
*
* @param string $faultcode (client | server)
* @param string $faultactor only used when msg routed between multiple actors
* @param string $faultstring human readable error message
* @param mixed $faultdetail detail, typically a string or array of string
*/
function soap_fault($faultcode, $faultactor = '', $faultstring = '', $faultdetail = '') {
parent::nusoap_base();
$this->faultcode = $faultcode;
$this->faultactor = $faultactor;
$this->faultstring = $faultstring;
$this->faultdetail = $faultdetail;
}
/**
* serialize a fault
*
* @return string The serialization of the fault instance.
* @access public
*/
function serialize() {
$ns_string = '';
foreach ($this->namespaces as $k => $v) {
$ns_string .= "\n xmlns:{$k}=\"{$v}\"";
}
$return_msg = '<?xml version="1.0" encoding="' . $this->soap_defencoding . '"?>' . '<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"' . $ns_string . ">\n" . '<SOAP-ENV:Body>' . '<SOAP-ENV:Fault>' . $this
->serialize_val($this->faultcode, 'faultcode') . $this
->serialize_val($this->faultactor, 'faultactor') . $this
->serialize_val($this->faultstring, 'faultstring') . $this
->serialize_val($this->faultdetail, 'detail') . '</SOAP-ENV:Fault>' . '</SOAP-ENV:Body>' . '</SOAP-ENV:Envelope>';
return $return_msg;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
soap_fault:: |
property | * The fault actor * * @access private | ||
soap_fault:: |
property | * The fault code (client|server) * * @access private | ||
soap_fault:: |
property | * The fault detail, typically a string or array of string * * @access private | ||
soap_fault:: |
property | * The fault string, a description of the fault * * @access private | ||
soap_fault:: |
function | * serialize a fault * * | ||
soap_fault:: |
function | * constructor |