Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 28th, 2007, 02:15 PM
Florian Laws
Guest
 
Posts: n/a
Default SoapClient: __doRequest doesn't get XML SOAP Request in its $request parameter?


Hello,

to work around an interoperability problem with the PHP5 SOAP extension,
I'd like to modify the generate XML SOAP request.
(as described in
http://www.schlossnagle.org/~george/...m-and-PHP.html
)

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
call.

Here is my code:

---
class MySoapClient extends SoapClient
{

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

$wsdl = "http://localhost:8080/geodirectoryws/geodirectoryws?WSDL"
$soapclient = new MySoapClient($wsdl);
$soapclient->getIPInfo(array("192.168.1.1");
---

I expect to see the entire XML as output of the var_dump() call, but
I only get 'string(285) "194.120.109.9"'
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?

Thanks,

Florian
"
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles