NuSoap vs PHP Soap Library. Where is getError?

I am converting old code that uses NuSoap for the PHP Soap Library. But the getError method in NuSoap PHP doesn't seem to exist in PHP Soap Libary, and I get this error:

Fatal error: Uncaught SoapFault exception: [Client] Function ("getError") is not a valid method for this service in index.php:33 Stack trace: #0 index.php(33): SoapClient->__call('getError', Array) #1 index.php(33): SoapClient->getError() #2 index.php(63): pay() #3 {main} thrown in /homeindex.php on line 33 

Here is my code:

 <?php $client = new SoapClient('my soap server'); $err = $client->getError(); ?> 

How should I go wrong in the PHP Soap library?

+7
source share
1 answer
 <?php $client = new SoapClient('my soap server'); $err = $client->soapCall($somfunctioname,$arrofargs ); ?> 

If there is some It error with soapCall.It returns an SoapFault () instance where you can register the error code, the description is so .. on

http://www.php.net/manual/en/soapclient.soapcall.php

+4
source

All Articles