/**
  * Shows an error message and outputs the SOAP result if passed
  *
  * @param string $result A SOAP result
  * @return void
  */
 public function handleError($error = null)
 {
     if ($this->logErrors === true) {
         $this->log($error);
         if ($this->client) {
             $this->log($this->client->__getLastRequest());
         }
     }
     throw new Exception($error);
 }
 /**
  * Calls a SOAP function
  *
  * @param string $functionName The name of the SOAP function to call.
  * @param array $arguments An array of the arguments to pass to the function.
  * @param array $options An associative array of options to pass to the client.
  * @param array $inputHeaders An array of headers to be sent along with the SOAP request.
  * @param array $outputHeaders If supplied, this array will be filled with the headers from the SOAP response.
  * @return mixed
  */
 public function __soapCall($functionName, $arguments, $options = null, $inputHeaders = null, &$outputHeaders = null)
 {
     if (Configure::read('debug') === true) {
         $this->log($functionName, LogLevel::INFO);
         $this->log($arguments, LogLevel::INFO);
         $this->log($options, LogLevel::INFO);
         $this->log($inputHeaders, LogLevel::INFO);
         $this->log($outputHeaders, LogLevel::INFO);
     }
     return parent::__soapCall($functionName, $arguments, $options, $inputHeaders, $outputHeaders);
 }