XML请求的示例以及下面的代码:
XML
<GetInventory>
<ClientID>API_ClientID </ClientID>
<UserID>API_UserID </UserID>
<Password>API_Password </Password>
<SecurityKey>API_SecurityKey</SecurityKey>
<Item>
<SKU>7003</SKU>
</Item>
<Item>
<SKU>7046</SKU>
</Item></GetInventory>
PHP
$options = array(
'exceptions' => 0,
'trace' => 1
);
$client = new SoapClient($soap_url, $options);
$clie_info = array(
'ClientID' => $client_id,
'UserID' => $user_id,
'Password' => $password,
'SecurityKey' => $security_key,
'Item' => array('SKU' => 'XX-XX-XX-XXXX-XXXX-10')
);
$result = $client->GetInventory($clie_info);
print_r($result);
上面是我对SOAP服务的简单请求。 作为回应,我得到了:
严重错误:SOAP-错误:解析WSDL:无法从'http://xxx.xxx.com/v4/sandbox/xxxxx'加载:D:\ xxx \ xxxxx \ xxxx \ api_3linx.php行中的标记html行1中的数据过早结束15
第15行是:
$client = new SoapClient($soap_url, $options);
我的问题是:我在做错什么,还是应该把矛头指向另一端-SOAP服务支持?