By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,589 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,589 IT Pros & Developers. It's quick & easy.

SoapClient: __doRequest doesn't get XML SOAP Request in its $request parameter?

P: n/a


to work around an interoperability problem with the PHP5 SOAP extension,
I'd like to modify the generate XML SOAP request.
(as described in

To acheive this, I subclass SoapClient and overwrite the __doRequest()
method. According to the PHP documentation and the article above, the
$request Parameter of __doRequest() should contain the entire XML SOAP
Request. However, in my test it only contains the parameter of the SOAP

Here is my code:

class MySoapClient extends SoapClient

public function __doRequest($request, $location, $action, $version)
// modify XML SOAP request here later
return parent::__doRequest($request, $location, $action, $version);

$wsdl = "http://localhost:8080/geodirectoryws/geodirectoryws?WSDL"
$soapclient = new MySoapClient($wsdl);

I expect to see the entire XML as output of the var_dump() call, but
I only get 'string(285) ""'
This happens with both PHP 5.0.4 and 5.2.0.

Am I doing something wrong, or is this a bug in PHP or the PHP documentation?


Feb 28 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.