Got a similar response with https WSDL URL using php soapClient
SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ...
After server has been updated from PHP 5.5.9-1ubuntu4.21 >> PHP 5.5.9-1ubuntu4.23 something went wrong for my client machine osx 10.12.6 / PHP 5.6.30, but MS Web Services Clients connections could be made without issues.
Apache2's server_access.log showed no entry when i tried to load WSDL so i added 'cache_wsdl' => WSDL_CACHE_NONE
to prevent client-side wsdl caching, but still got no entries. Finally i tried to load wsdl per CURL -i
checked HEADERS but all seemed to be ok..
Only libxml_get_last_error()
provided some insight > SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
So I added some ssl options to my call:
$contextOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
));
$sslContext = stream_context_create($contextOptions);
$params = array(
'trace' => 1,
'exceptions' => true,
'cache_wsdl' => WSDL_CACHE_NONE,
'stream_context' => $sslContext
);
try {
$proxy = new SoapClient( $wsdl_url, $params );
} catch (SoapFault $proxy) {
var_dump(libxml_get_last_error());
var_dump($proxy);
}
In my case 'allow_self_signed' => true
did the trick!