首页新闻找找看学习计划

web service java可以调用 php不行 json

0
悬赏园豆:20 [待解决问题]

//javademo代码
JSONObject jsonparam=new JSONObject();
jsonparam.put("logincode","4331010743214");
jsonparam.put("loginpass","");
jsonparam.put("watercode","43310101");
jsonparam.put("userid","101000101");
jsonparam.put("order","07432142013071700001");
jsonparam.put("date","201307171730");
jsonparam.put("money","80");
Client client = new Client(new URL("http://XXX.XXX.XXX:8080/ccpay/services/PayService?wsdl"));
Object[] results = client.invoke("payment", new Object[] {jsonparam.toString()});
System.out.println(results[0]);

报错:Not enough message parts were received for the operation.

无限REIZ的主页 无限REIZ | 初学一级 | 园豆:3
提问于:2019-11-09 10:32
< >
分享
所有回答(1)
0

不行?肯定有报错吧,建议可以贴上报错看看

Beyond-bit | 园豆:2641 (老鸟四级) | 2019-11-09 13:50

贴了
try{
$params = array(
'logincode' => 'xx',
'loginpass' => strtoupper(md5('xx')),
'watercode' => 'xx',
'userid' => 'xx'
);
$params = json_encode($params);
$client = new SoapClient('http://42.96.168.152:8086/ccpay/services/PayService?wsdl');
$a = $client->__soapCall('getcustwaterrate',['in0'=>$params]);
var_dump($a);
}catch (Exception $e)
{
var_dump($e->getMessage());
}

支持(0) 反对(0) 无限REIZ | 园豆:3 (初学一级) | 2019-11-09 14:12
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册