本文介紹了未捕獲的 SoapFault 異常:[HTTP] 獲取 http 標頭時出錯的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我正在嘗試創(chuàng)建到 Magento 網(wǎng)絡(luò)服務(wù)的soap 連接,但是當我嘗試創(chuàng)建soap 客戶端類的實例時出現(xiàn)錯誤.我可以在 Firefox 中查看 wsdl 文件而沒有問題,我可以看到 php 在 apaches 日志中發(fā)出對 wsdl 的請求,但它仍然失敗.Nusoap可以連接.
I'm trying to create a soap connection to Magento's web services, however I'm getting an error when I try and create an instance of the soap client class. I can view the wsdl file in firefox without problems and I can watch php make the request for the wsdl in apaches logs but it still fails. Nusoap can connect.
$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>
謝謝
推薦答案
嘗試設(shè)置:
default_socket_timeout = 120
在您的 php.ini
文件中.
這篇關(guān)于未捕獲的 SoapFault 異常:[HTTP] 獲取 http 標頭時出錯的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!