SoapFault exception: Could not connect to host

后端 未结 27 1557
-上瘾入骨i
-上瘾入骨i 2020-12-01 07:47

Sometimes fail to call the web service.

This problem happens all the time.

What could be the problem?

Error:
    SoapFault exception: [HTTP]          


        
27条回答
  •  眼角桃花
    2020-12-01 08:33

    I am adding my comment for completeness, as the solutions listed here did not help me. On PHP 5.6, SoapClient makes the first call to the specified WSDL URL in SoapClient::SoapClient and after connecting to it and receiving the result, it tries to connect to the WSDL specified in the result in:

    
    

    And the call fails with error Could not connect to host if the WSDL is different than the one you specified in SoapClient::SoapClient and is unreachable (my case was SoapUI using http://host.local/).

    The behaviour in PHP 5.4 is different and it always uses the WSDL in SoapClient::SoapClient.

提交回复
热议问题