【发布时间】:2010-10-29 13:41:42
【问题描述】:
我正在尝试创建与 Magento 的 Web 服务的soap 连接,但是当我尝试创建soap 客户端类的实例时出现错误。我可以毫无问题地在 Firefox 中查看 wsdl 文件,我可以看到 php 在 apaches 日志中发出对 wsdl 的请求,但它仍然失败。 Nusoap 可以连接。
$proxy = new SoapClient('someaddress?wsdl');
错误是
<b>Fatal error</b>: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in /home/sites/xxx/xxx_main/system/application/views/contentpage_templates/gift_service.php:29
Stack trace:
[internal function]: SoapClient->__doRequest('<?xml version="...', 'http://cornishw...', 'urn:Mage_Api_Mo...', 1, 0)
[internal function]: SoapClient->__call('call', Array)
/home/sites/xxx/xxx_main/system/application/views/contentpage_templates/gift_service.php(29): SoapClient->call(NULL, 'catalog_categor...', 5, 'giftshop')
/home/sites/xxx/xxx_main/system/application/libraries/MY_Loader.php(586): include('/home/sites/cor...')
/home/sites/xxx/xxx_main/system/application/libraries/MY_Loader.php(228): MY_Loader->_ci_load(Array, '')
/home/sites/xxx/xxx_main/system/application/modules/contentpage/controllers/contentpage.php(44): MY_Loader->view('contentpage_tem...', false, true)
[internal function]: Contentpage->index()
/home/sites/xxx in <b>/home/sites/xxx/xxx_main/system/application/views/contentpage_templates/gift_service.php</b> on line <b>29</b>
谢谢
【问题讨论】:
-
我可能弄错了,但调用堆栈中的“gift_service.php(29): SoapClient->call(NULL, 'catalog_categor...'”行似乎并不对应到“$proxy = new SoapClient”,但类似于“proxy->catalog_categories()”?请(仔细)检查 gift_service.php 中的第 29 行