SoapFault exception: Could not connect to host

后端 未结 27 1641
-上瘾入骨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:23

    It seems the error SoapFault exception: Could not connect to host can be caused be several different things. In my cased it wasn't caused by proxy, firewall or DNS (I actually had a SOAP connection from the same machine working using nusoap without any special setup).

    Finally I found that it was caused by an invalid pem file which I referenced in the local_cert option in my SoapClient contructor.

    Solution: When I removed the certificate chain from the pem file, so it only contained certificate and private key, the SOAP calls started going through.

提交回复
热议问题