我試圖創建一個到Magento的Web服務的soap連接,但是當我嘗試創建soap客戶端類的實例時遇到錯誤。我可以在firefox中查看wsdl文件,沒有任何問題,我可以看到php在apaches日誌中發出wsdl的請求,但仍然失敗。 Nusoap可以連接。未捕獲的SoapFault異常:[HTTP]錯誤獲取http標頭
$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.ini .php(29):SoapClient- >在調用堆棧中調用(NULL,'catalog_categor ...',「似乎不對應於」$ proxy = new SoapClient「,但類似於」proxy-> catalog_categories()「 ?請(double)在gift_service.php中檢查第29行 – VolkerK 2009-05-28 14:04:31