未捕获的 SoapFault 异常:[HTTP] 获取 http 标头时出错

时间:2022-12-28
本文介绍了未捕获的 SoapFault 异常:[HTTP] 获取 http 标头时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建到 Magento 网络服务的soap 连接,但是当我尝试创建soap 客户端类的实例时出现错误.我可以在 Firefox 中查看 wsdl 文件而没有问题,我可以看到 php 在 apaches 日志中发出对 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-&gt;__doRequest('&lt;?xml version=&quot;...',    'http://cornishw...', 'urn:Mage_Api_Mo...', 1, 0)
[internal function]: SoapClient-&gt;__call('call', Array)
/home/sites/xxx/xxx_main/system/application/views/contentpage_templates/gift_service.php(29): SoapClient-&gt;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-&gt;_ci_load(Array, '')
/home/sites/xxx/xxx_main/system/application/modules/contentpage/controllers/contentpage.php(44): MY_Loader-&gt;view('contentpage_tem...', false, true)
[internal function]: Contentpage-&gt;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>

谢谢

推荐答案

尝试设置:

default_socket_timeout = 120

在您的 php.ini 文件中.

这篇关于未捕获的 SoapFault 异常:[HTTP] 获取 http 标头时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:如何触发在 magento 中收到的付款事件? 下一篇:Magento - 扩展相同核心类的多个类

相关文章

最新文章