先上代码!这是webservice的接口代码:public class searchImpl implements Isearch {
public String getResult(String para, int first, int max) {
...
}
}
下面是对应的PHP代码$client = new SoapClient ( "http://localhost:8080/SearchTF/services/search?wsdl" );
$parameters = array('para'=>$'hellotest', 'first'=>'1', 'max'=>'10');
//$parameters = array($_POST[keywordtextfield],1,10);
$out = $client->__soapCall("getResult",$parameters);
var_dump($out);
但是在运行的时候会出错,错误提示如下:
Fatal error: Uncaught SoapFault exception: [soap:Client] Not enough message parts were received for the operation. in E:\re\Apache Group\Apache2\htdocs\index.php:78 Stack trace: #0 E:\re\Apache Group\Apache2\htdocs\index.php(78): SoapClient->__soapCall('getResult', Array) #1 {main} thrown in E:\re\Apache Group\Apache2\htdocs\index.php on line 78其中Line78就是$out = $client->__soapCall("getResult",$parameters);这一句。
请问哪里有错呢?怎样修改?
public String getResult(String para, int first, int max) {
...
}
}
下面是对应的PHP代码$client = new SoapClient ( "http://localhost:8080/SearchTF/services/search?wsdl" );
$parameters = array('para'=>$'hellotest', 'first'=>'1', 'max'=>'10');
//$parameters = array($_POST[keywordtextfield],1,10);
$out = $client->__soapCall("getResult",$parameters);
var_dump($out);
但是在运行的时候会出错,错误提示如下:
Fatal error: Uncaught SoapFault exception: [soap:Client] Not enough message parts were received for the operation. in E:\re\Apache Group\Apache2\htdocs\index.php:78 Stack trace: #0 E:\re\Apache Group\Apache2\htdocs\index.php(78): SoapClient->__soapCall('getResult', Array) #1 {main} thrown in E:\re\Apache Group\Apache2\htdocs\index.php on line 78其中Line78就是$out = $client->__soapCall("getResult",$parameters);这一句。
请问哪里有错呢?怎样修改?
解决方案 »
- 我要在网页中显示php文件代码,怎么做到安全
- 二次开发思路求指导
- smarty 数据库查询问题
- 送给学PHP新手的新春礼物
- 如何用PHP 发送HTTP的GET方法后正常显示获取的网页数据?
- ● 高分!求一段很easy的代码!
- 请问这样的情况如何自动分配ID(急)
- ^^^^^^^第一次做网站, 给自己在海外发布的共享软件制作的, 哪位XDJM帮忙给我一个PHP+Mysql的模板啊? 类似这个网站的http://www.blazevide
- imagecreatefromjpeg为什么总是失败,返回为空?
- 急,急,,好乱的安装问题????????
- 一个php文件如何处理多个表单
- 求助关于用腾讯接口获取来访客户所在地的问题
var_dump($client->getResult('hellotest',1,10));
你要发布到外网才能看.这边不能试
发布到外网?没懂啊。。我用jsp都可以的,php不知道怎么写