简体   繁体   English

肥皂客户端停止工作

[英]Soap client stopped working

I have a website which frequently makes SOAP calls to a particular API. 我有一个网站,经常对特定的API进行SOAP调用。 The site was working fine for a few months of time, however the SOAP functionality suddenly stopped working without any known reason, the error was "Cannot connect to host". 该站点可以正常工作几个月,但是SOAP功能突然在没有任何已知原因的情况下停止工作,错误是“无法连接到主机”。

The WSDL service has not moved or shut down. WSDL服务尚未移动或关闭。

After this I updated plesk from version 12 to version 17. SOAP client is still not working but now its a different error: 此后,我将plesk从版本12更新到版本17。SOAP客户端仍然无法正常工作,但是现在出现了另一个错误:

SOAP-ERROR: Parsing WSDL: Couldn't load from (URL) : failed to load external entity (URL) SOAP错误:解析WSDL:无法从(URL)加载:无法加载外部实体(URL)

This is my SOAP call: 这是我的SOAP调用:

$opts = array('http'=>array('user_agent' => 'PHPSoapClient'));

$context = stream_context_create($opts);
libxml_disable_entity_loader(false);

$client = new SoapClient($url,array('stream_context' => $context,'cache_wsdl' => WSDL_CACHE_NONE));

Any possible solutions? 任何可能的解决方案?

EDIT : New information came in, so the API server had DNS problems, how can I restore my connection to the API? 编辑 :出现了新信息,因此API服务器出现了DNS问题,如何恢复与API的连接?

Your php server is clearly not reaching out the soap server. 您的php服务器显然没有伸手肥皂服务器。 This might help: 这可能会有所帮助:

  • Try checking directly from php server if the service are reachable: 尝试直接从php服务器检查服务是否可以访问:

    1. wget {url} > page.txt wget {url}> page.txt
    2. nano (or equivalent) page.txt 纳米(或等效)page.txt
  • Try using other program to consume the server, I suggest Soap Ui 尝试使用其他程序消耗服务器,建议使用Soap Ui

  • On the php server try ping the service url and see if the IP is resolved. 在php服务器上,尝试ping服务网址,并查看IP是否已解析。

  • Check if any other soap service is reachable, you can use this service 检查是否有其他肥皂服务可用,您可以使用此服务

If this not help you coming up with a solution, post here the results to help others solving it. 如果这不能帮助您提出解决方案,请在此处发布结果以帮助其他人解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM