我有一个在线商店的soap api,具有给定的端点url和wsdl文件url:
.test{
margin:5px;
}
我尝试了两个Variants,但从未成功:
变体1:
$API_URL = "$SHOP_URL/index.php?page=xt_api";
$API_URL_WSDL = "$SHOP_URL/index.php?page=xt_api&wsdl";
错误:
$soap = new SoapClient($API_URL_WSDL);
变体2:
PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: No [binding] element with name 'Commerce APIBinding'...
错误:
$soap = new SoapClient(null, array(
'location' => $API_URL,
'uri' => $API_URL_WSDL,
'soap_version' => SOAP_1_1
));
$orders = $soap->getArticle($API_USER, $API_PASSWOR, 269, 1);
在这种情况下,创建SoapClient时没有错误。调用soap方法“ getArticle”时发生错误。
有什么主意我在这里做错了吗?