用php调用service接口、展示数据在前台显示;
可是本地搭建的soap就报错
Fatal error: Uncaught SoapFaultexception: [Client] SoapClient::SoapClient() [soapclient.soapclient]: Invalidparameters in D:publicpayindex.php:10 Stack trace: #0D:publicpayindex.php(10):SoapClient->SoapClient('http://192.168....', 'wsdl')#1 {main} thrown in D:publicpayindex.php on line10
很操蛋的问题,
但是穿到服务器上执行是可以的
或许这个soap只能通过远程执行吧,麻烦高手知道的给我解释下
以上是java接口的soap
下面是php的soap方法
客户端使用:
$soap=new SoapClient(null, array(
'location'=>"http://192.168.2.107/php_soap/soap.php",
'uri'=> "http://test-uri/"));
$id=22;
$soap->show($id);
服务器端:
class test{
//这个方法用户memcsql插入sql
functionshow($sql_dev_status){
//内部写逻辑方法
![soap问题 soap](http://img.aihuau.com/images/01111101/01021543t01616e31039e2a1930.jpg)
returntrue;
}
}
#####################################################
$server = new SoapServer(null, array('uri' =>"http://test-uri/"));
$server->setClass('test');//发布类
$server->handle();