Pear SOAP - using WSDL but different endpoint and sending cookies
| From: | Jason Levitt | Date: | Tue, 17 Oct 2006 17:18:34 +0000 |
| Subject: | Pear SOAP - using WSDL but different endpoint and sending cookies | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-2378@lists.php.net to get a copy of this message | ||
A quick question about the latest version of Pear SOAP...
I want to use WSDL, but I want to
a) specify a different endpoint than is in the WSDL
b) send a cookie
c) use WSDL caching
So, if I use SOAP_Client, I don't see a direct way to
change the endpoint ($_endpoint is ignored in favor of the
WSDL 'location'). And I don't see how to engage WSDL caching.
$myclient = new SOAP_Client(WSDL_PATH, true, false);
$myclient->_wsdl->services['myname']['ports']['myname']['address']['location']
= $newloc;
$myclient->setOpt('cookies', $cookies );
If I use SOAP_WSDL, I can engage WSDL caching, but I still have the
endpoint issue, and I cannot see any way to send a cookie:
$wsdl = new SOAP_WSDL(WSDL_PATH, null, true);
$wsdl->services['myname']['ports']['myname']['address']['location'] = $newloc;
$myclient = $wsdl->getProxy();
Do I have to extend this proxy class with methods to do all this stuff?
J