当前位置:Gxlcms > PHP教程 > php调用webservices错误,求指点

php调用webservices错误,求指点

时间:2021-07-01 10:21:17 帮助过:4人阅读

soap_defencoding = 'UTF-8';$params = array('11');echo $soap->call('test',$params);?>

Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() [soapclient.soapclient]: Invalid parameters in /opt/lampp/htdocs/shopping2013/Dragon/Client.php:12 Stack trace: #0 /opt/lampp/htdocs/shopping2013/Dragon/Client.php(12): SoapClient->SoapClient('http://192.168....', true) #1 {main} thrown in /opt/lampp/htdocs/shopping2013/Dragon/Client.php on line 12
这是什么错误,怎么处理


回复讨论(解决方案)

soapclient 是 php SOAP 扩展的类

nusoap.php 定义的是 soap_client 吧?

soapclient 是 php SOAP 扩展的类

nusoap.php 定义的是 soap_client 吧?


定义了两个class
class nusoap_base
class nusoap_client extends nusoap_base

不对,有好几个class
class nusoap_base
class nusoap_fault extends nusoap_base
class nusoap_xmlschema extends nusoap_base
class soapval extends nusoap_base
class soap_transport_http extends nusoap_base
class nusoap_server extends nusoap_base
class wsdl extends nusoap_base
class nusoap_parser extends nusoap_base
class nusoap_client extends nusoap_base

soap调用通过了,是你的client.php本身有问题,单独打开这个CLIENT。php,看看有么问题

soap调用通过了,是你的client.php本身有问题,单独打开这个CLIENT。php,看看有么问题

问题中贴出的错误就是访问client.php的错误吖

client.php是你内部项目错误,这不干WEBSERVICE什么事

亲,问题解决了吗

人气教程排行