0

I make soap requests using this Code :

try {
    $S = new \SoapClient($this->wsdl);
    $method = 'method';
    $params = array('ID' => $Id, 'Code'=> $Code);
    return  $S->__call($method, $params);
}catch (\Exception $e) {
    return  $e->getMessage();
}

But an Exception is raised :

SoapFault exception: [HTTP] Could not connect to host

I tried to return all functions described in the WSDL for the Web service

$S = new \SoapClient($this->wsdl);
return $S->__getFunctions();

And I have all functions including my 'method' used above.

What could be the problem?

3
  • It seems pretty clearly stated in the error message ... the specified endpoint is unreachable... Either it is down or your wsdl is pointing to the wrong place.
    – Orangepill
    Jul 28, 2015 at 14:54
  • But the __getFunctions() function works very well!
    – Liza
    Jul 28, 2015 at 15:30
  • It's getting the functions defined within the wsdl... it doesn't have to reach out to the endpoint for that
    – Orangepill
    Jul 28, 2015 at 15:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.