Page 1 of 1

Calling Web Service : Problem

Posted: Sun May 17, 2009 11:12 am
by brijbmishra
Hi All,

I am new in PHP,

I made an web app. using PHP which is consuming a .NET Web service its working in my development environment well but when this same application is deployed in production environment it show strange behaviour and the error which is logged is :

PHP Fatal error: Uncaught SoapFault exception: [Client] Function
("getError") is not a valid method for this service in <physical location of the page>

thanks and regards
BjBM

Re: Calling Web Service : Problem

Posted: Sun May 17, 2009 12:05 pm
by Darhazer
Did you develop it with the PHP 5 SOAP extension or you've used some 3rd party soap toolkit, like NuSOAP?

Re: Calling Web Service : Problem

Posted: Sun May 17, 2009 2:14 pm
by brijbmishra
Hi,

I have used NuSOAP.

Re: Calling Web Service : Problem

Posted: Mon May 18, 2009 6:37 am
by brijbmishra
hi all,

Plz. help its urgent.

Re: Calling Web Service : Problem

Posted: Tue May 19, 2009 3:36 pm
by Darhazer
#NuSOAP, unlike the PHP SoapClient, have no __call() method (because it was not developed for PHP 5), so #using $client->$operation() is not possibe
#
#You have to use $client->call($operations, $params) instead
#
#
P.S.
What I meant is that the SoapClient->getError() will try to call SOAP service getError, and getError() is a nusoap function, that return the error. the PHP 5 Soap throws a SoapFault exception so it does not need a method like a getError.

You have to disable soap extension on your server to get the nusoap code working, or open nusoap.php and replace soapclient with nusoapclient, and everywhere in your code to replace it also.