21,886
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="UTF-8"?>
<processSP><wmsSecurityInfo><username>40222</username><password>flux22</password></wmsSecurityInfo><wmsParam><customerid>GXG</customerid><messageid>106D</messageid><stdno>SO</stdno><warehouseid>GXG_WMS</warehouseid><param>1209200001346</param></wmsParam></processSP>
,按说没有空值呀。。又想是不是xml的UTF-8格式导致的,顺便问下这样一个UTF-8格式的xml字符串,如何改变编码?($iconv_str = iconv('UTF-8', 'GBK', $str);php的这个函数不行)但这或许不是根本原因,还请大神指点,下面是我调用的代码以及webservice提供的说明
$str = array2xml($data,'processSP');
$iconv_str = iconv("UTF-8", "GBK", $str);
$soap_client = new SoapClient('http://192.168.1.9:8081/datahubWeb/WMSSOAP2/WSERPService/ERP/Service3?wsdl');
$soap_result = $soap_client->processSP($iconv_str);
,
<wsdl:operation name="processSP">
<wsdl:input message="tns:processSP" name="processSP"></wsdl:input>
<wsdl:output message="tns:processSPResponse" name="processSPResponse"></wsdl:output>
</wsdl:operation>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.webservices.services.adapter.datahub/">
<soapenv:Header/>
<soapenv:Body>
<ws:processSP>
<!--Optional:-->
<wmsSecurityInfo>
<!--Optional:-->
<password>PWD</password>
<!--Optional:-->
<username>USER</username>
</wmsSecurityInfo>
<!--Optional:-->
<wmsParam>
<!--Optional:-->
<customerid>XXXXX</customerid>
<!--Optional:-->
<messageid>8888</messageid>
<!--Zero or more repetitions:-->
<param>1234534</param>
<!--Optional:-->
<stdno>SO</stdno>
<!--Optional:-->
<warehouseid>XXXX</warehouseid>
</wmsParam>
</ws:processSP>
</soapenv:Body>
</soapenv:Envelope>
$soap_result = $soap_client->processSP($req_data);//Fault occurred while processing.