I want to override SoapClient::__doRequest()
in my custom class and use my own curl based transport, as suggested here.
According to the PHP manual, __doRequest()
has this signature:
public string SoapClient::__doRequest ( string $request , string $location , string $action , int $version [, int $one_way = 0 ] )
And the $request
parameter is:
request
The XML SOAP request.
But this seems to be wrong. I don't get any XML in $request
but a cryptic string like:
string(1496) " 14120188025349F
Here's the simple class I've used:
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);
}
}
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.