Calling Web Service : Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
brijbmishra
Forum Newbie
Posts: 3
Joined: Sun May 17, 2009 11:05 am

Calling Web Service : Problem

Post 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
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Calling Web Service : Problem

Post by Darhazer »

Did you develop it with the PHP 5 SOAP extension or you've used some 3rd party soap toolkit, like NuSOAP?
brijbmishra
Forum Newbie
Posts: 3
Joined: Sun May 17, 2009 11:05 am

Re: Calling Web Service : Problem

Post by brijbmishra »

Hi,

I have used NuSOAP.
brijbmishra
Forum Newbie
Posts: 3
Joined: Sun May 17, 2009 11:05 am

Re: Calling Web Service : Problem

Post by brijbmishra »

hi all,

Plz. help its urgent.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Calling Web Service : Problem

Post 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.
Post Reply