Beispiel #1
0
 /**
  * @return string  the error message in XML format
  */
 public function serialize()
 {
     $rs = "<methodResponse>\n";
     if ($this->faultCode) {
         $rs .= "<fault>\n  <value>\n    <struct>\n      <member>\n        <name>faultCode</name>\n        <value><int>" . $this->faultCode . "</int></value>\n      </member>\n      <member>\n        <name>faultString</name>\n        <value><string>" . $this->faultString . "</string></value>\n      </member>\n    </struct>\n  </value>\n</fault>";
     } else {
         $rs .= "<params>\n<param>\n" . $this->value->serialize() . "</param>\n</params>";
     }
     $rs .= "\n</methodResponse>";
     return $rs;
 }