title: How to override SoapClient::__doRequest()?
body: <p>I want to override <code>SoapClient::__doRequest()</code> in my custom class and use my own curl based transport, as suggested <a href="https://stackoverflow.com/questions/3500527/php-soapclient-timeout">here</a>.</p>
  
  <p>According to the PHP manual, <code>__doRequest()</code> has this signature:</p>
  
  <p><code>public string SoapClient::__doRequest ( string $request , string $location , string $action , int $version [, int $one_way = 0 ] )</code></p>
  
  <p>And the <code>$request</code> parameter is:</p>
  
  <ul>
  <li><code>request</code> The XML SOAP request.</li>
  </ul>
  
  <p>But this seems to be wrong. I don't get any XML in <code>$request</code> but a cryptic string like:</p>
  
  <pre><code>string(1496) " 14120188025349F
  </code></pre>
  
  <p>Here's the simple class I've used:</p>
  
  <pre><code>class MySoapClient extends SoapClient
  {
      public function __doRequest($request, $location, $action, $version, $one_way = false)
      {
          var_dump($request);
          return parent::__doRequest($request, $location, $action, $version, $one_way);
      }
  }
  </code></pre>
  
  <p>So what is wrong? Did they somehow change the internal implementation of this without updating the manual? For reference, my PHP version is 5.4.6 on a Ubuntu 12.10 box.</p>