SoapFault exception: Could not connect to host

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

    A misconfigured service leaves the default namespace with tempuri.org

    This means the connection to the wsdl will work, but the function call will fail.

    Stacktrace:

    SoapClient->__doRequest('http://example.com...', 'http://tempuri.org....', 2, 0)

    To remediate this, you must explicitly set the location using __setLocation()

    $this->soapClient = new \SoapClient(WS_URL);
    $this->soapClient->__setLocation(WS_URL);
    

提交回复
热议问题