Rumah >pembangunan bahagian belakang >tutorial php >php 调用webservices错误,求指点
<?phpdefine('IN_ECS', true);//require($_SERVER['DOCUMENT_ROOT'].'/includes/init.php');require dirname(dirname(__FILE__)).'/includes/init.php';include dirname(__FILE__)."/nusoapClass/lib/nusoap.php";header('Content-Type: text/html; charset=GBK');/* * 调用java的接口 * */$soap = new soapclient("http://192.168.5.120:8081/shopping2013/Dragon/Service.php?wsdl", true);$soap->soap_defencoding = 'UTF-8';$params = array('11');echo $soap->call('test',$params);?>
soapclient 是 php SOAP 扩展的类
nusoap.php 定义的是 soap_client 吧?
soapclient 是 php SOAP 扩展的类
nusoap.php 定义的是 soap_client 吧?
不对,有好几个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什么事
亲,问题解决了吗