I have to make a SoapClient in PHP for a webservice that is hosted on a Windows / IIS.
When I run the script from a local IIS + PHP, it works.
When I run the same script from a local XAMP of from an Apache webserver, I always get the same error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn’t load from ‘https://online.wings.eu:8080/wsdl/IWingsWeb’
<?php
$url = 'https://online.wings.eu:8080/wsdl/IWingsWeb';
$options["connection_timeout"] = 25;
$options["location"] = $url;
$options['trace'] = 1;
$client = new SoapClient($url,$options);
print_r($client->__getFunctions());
?>
SOAP and openssl is enable on the Apache.
I can also access other services that are hosted on a non-Windows server.
Is this a problem of my Apache or is this a problem of the Windows server that hosts the SOAP server?
Probably the connection between Apache and the IIS server can not be established. You should check the following:
Like this:
Note that PHP’s SOAP implementation won’t use the above wrapper to download the WSDL files (you have to do it manually), but you can use it to the actual WS calls, and might actually find out why it fails.
And you can use the above mentioned class like any
SoapClient, eg: