u014102326
wocatangxiaobing
2016-07-29 04:11

php用soapclient调用java的webservice,传参数总是识别不了,求高手解答

50

header('Content-Type: text/html; charset=UTF-8');
$client = new SoapClient('http://logis.etianneng.cn/ws/productLogisticsInterfaceWS?wsdl');
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'utf-8';
$parm=array('id'=>'1254','code'=>'001');
$result = $client->__soapCall('sjmcSynPriceInsert',$parm);
类似上面代码
php传的是array
java端参数是String
java端根据日志看到获取到的参数是

 <param1>1254</param1><param2>001</param2>

没有参数名然后就无法识别了,报错

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换