how to correctly invoke webservice
| From: | Juan Nin | Date: | Fri, 21 Jan 2005 23:45:00 +0000 |
| Subject: | how to correctly invoke webservice | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-1710@lists.php.net to get a copy of this message | ||
Hi!
Sorry if this question is too basic, but I'm having trouble on invoking
a webservice
I'm running PEAR::SOAP on PHP 4.3.10 under Linux
If I run the following code to invoke a webservice which returns a
string it works fine:
<?
require_once 'SOAP/Client.php';
$wsdl = newSOAP_WSDL('http://www.mydomain.com/mywebservice.asmx?WSDL'); $client = $wsdl->getProxy(); $reply = $client->myFunction('someString','someOtherString'); ?> now, if I replace the strings passed to myFunction by variables, it stops working and I recieve SOAP errors I mean using this: <? require_once 'SOAP/Client.php';
$wsdl = newSOAP_WSDL('http://www.mydomain.com/mywebservice.asmx?WSDL'); $client = $wsdl->getProxy(); $string1 = 'someString'; $string2 = 'someOtherString'; $reply = $client->myFunction(string1 ,string2); ?> There's very little info on this module on internet... what am I doing wrong?? Thanks in advance, Juan