NuSoap 与 PHP Soap 库。 getError 在哪里?
我正在将使用 NuSoap 的旧代码转换为 PHP Soap 库。但是 NuSoap PHP 中的 getError 方法似乎在 PHP Soap Libary 中不存在,并且我收到此错误:
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
这是我的代码:
<?php
$client = new SoapClient('my soap server');
$err = $client->getError();
?>
How I Should get error in PHP Soap library?
I'm converting an old code which use NuSoap to PHP Soap Library. But method getError in NuSoap PHP seems not 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 I supposed to get error in PHP Soap library?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果有任何错误它与soapCall。它返回一个SoapFault()实例,您可以在其中记录错误代码,描述等..在
http://www.php.net/manual/en/soapclient.soapcall.php
If there is any error It with the soapCall .It returns a instance of SoapFault() where you can log the errorcode, description so.. on
http://www.php.net/manual/en/soapclient.soapcall.php