我尝试使用 magento 网络服务,但是当我尝试调用网络服务时:
$proxy = new SoapClient(' http://mydomain.com/magento/index.php/api/v2_soap/?wsdl ');
我收到此错误:未捕获的 SoapFault 异常:[WSDL] SOAP-ERROR:解析 WSDL:无法从“ http://mydomain.com/magento/index.php/api/v2_soap/?wsdl ”加载:实体“复制' 未定义\n 在 /var/www/trunk/test.php:3\n堆栈跟踪:\n#0 /var/www/trunk/test.php(3),
所以这个实体'副本'没有定义你能告诉我为什么会这样,我应该在我的服务器中添加一些东西吗?
$proxy = new SoapClient('http://127.0.0.1/magento/index.php/api/soap/?wsdl=1');
// create authorized session id using api user name and api key
// $sessionId = $proxy->login('apiUser', 'apiKey');
$sessionId = $proxy->login('karimeri', 'xxxxxxx');
// Get customer info for customer id = 1
$customerinfo = $proxy->customerCustomerInfo($sessionId,1);
print_r($customerinfo);