Ik probeer met php een verbinding te maken met een SOAP webservice. De WSDL is via m'n browser gewoon op te vragen, en ook met file_get_contents krijg ik de WSDL gewoon binnen. Echter, als ik via
De verbinding wil opzetten krijg ik PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'url naar webservice' : failed to load external entity "url naar webservice"
Op de productieomgeving is de webservice gewoon bereikbaar, maar zowel op mijn lokale machine als op de testserver is de webservice niet (altijd) bereikbaar.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| $opts = array('http'=>array('user_agent' => 'PHPSoapClient'));
$context = stream_context_create($opts);
$options = array(
"trace" => true,
"exception" => 0,
'style' => SOAP_RPC,
'use' => SOAP_ENCODED,
"connection_timeout" => 15,
'stream_context' => $context,
'cache_wsdl' => WSDL_CACHE_NONE,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
"features" => SOAP_SINGLE_ELEMENT_ARRAYS);
return $options;
$client = new \SoapClient($wsdl, $options); |
De verbinding wil opzetten krijg ik PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'url naar webservice' : failed to load external entity "url naar webservice"
Op de productieomgeving is de webservice gewoon bereikbaar, maar zowel op mijn lokale machine als op de testserver is de webservice niet (altijd) bereikbaar.
Raar... Is zo gek nog niet