1

I have a problem that I can't call the webservice from other server and it shows error like this :

Error Fetching http headers

When I looked into more detailed error, I realized that the endpoint is not right. For example, I wrote this in my php code

$client=new SoapClient('https://www.example.com:17819/wsdl/sample.php?wsdl', array("trace" => 1, "connection_timeout" => 5, "exceptions" => 1));

The endpoint supposed to be in https, but the error shows that the endpoint begins with http --> http: //www.example.com:17819/wsdl/sample.php?wsdl

What am I missing in my php client code?

Thanks

Webster
  • 1,113
  • 2
  • 19
  • 39
  • Possible duplicate of [Error fetching http headers in SoapClient](http://stackoverflow.com/questions/9403486/error-fetching-http-headers-in-soapclient) – Mr. Engineer Feb 22 '16 at 07:03
  • @Mr.Engineer Hi Sir, thanks for your info, But I think My Error is different here. But I Appreciate your info sir! – Webster Feb 22 '16 at 07:24

1 Answers1

0

I just solved this issue. I used nusoap_client to solve this issue. And I change the request format too, like this

$msg = "<soapenv:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:urn='urn:sj_service'>";

And so on..

Thanks

Webster
  • 1,113
  • 2
  • 19
  • 39