You are here

function soap_fault::serialize in Salesforce Suite 5

Same name in this branch
  1. 5 includes/nusoap.php \soap_fault::serialize()
  2. 5 includes/nusoap.orig.php \soap_fault::serialize()
Same name and namespace in other branches
  1. 5.2 includes/nusoap.php \soap_fault::serialize()
  2. 5.2 includes/nusoap.orig.php \soap_fault::serialize()

* serialize a fault * *

Return value

string The serialization of the fault instance. * @access public

File

includes/nusoap.orig.php, line 961

Class

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

Code

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;
}