我正在向基于Windows的Web服务发送一些数据。
我正在使用以下代码
$client = new soapclient("http://XXXXXXXXX/WEB_DAL/customer.asmx?wsdl", array('trace' => 1, 'exceptions' => 0));
$params -> productType = 281;
$params -> projectType = 1;
$client -> GetUserDataset("GetUserDataset", $params);
我得到了一个soapFault
当我使用$ client获取最后发送的XML时 - > __getLastRequest(),我得到:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.vvvvvvvvv.com/">
<SOAP-ENV:Body>
<ns1:GetUserDataset/>
<param1>
<data/>
<productType>281</productType>
<projectType>1</projectType>
</param1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
需要发送的是
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.vvvvvvvvv.com/">
<SOAP-ENV:Body>
<ns1:GetUserDataset/>
<productType>281</productType>
<projectType>1</projectType>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我不知道为什么php会发送这些额外的节点
<param1><data/></param1>
有什么想法吗?