tags:

views:

166

answers:

2

Trying to make Soap connection to a https:// WSDL source via PHP/Win32, but keep getting the error:

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "https://...

If I try to save the WSDL locally and access it then, the SoapFault->faultstring property has the message "SSL support is not available in this build".

After some Googling, seems like PHP SOAP cannot connect to a HTTPS source. HTTP is OK, though.

Is there a workaround for this? Or is there an alternative SOAP version/module I can install?

A: 

I've had success with SSL and SOAP using NuSOAP:

http://nusoap.sourceforge.net/

pygorex1
A: 

I had the same problem. openSSL, cURL were enabled, initiated a SoapClient with option of location to stored certificated, etc, etc.. tried everything.

Turns out it does work in CLI mode. Thus php_sapi = CLI. As we almost always run our webservices calls as a cronjob, scheduled task in Windows, this is not really a bad thing. I was really glad to get it working!

Update: Okay, turns out when PHP is running as an Apache module, it uses the by opensll required libraries libeay32.dll and ssleay32.dll from the Apache install. When using PHP in CLI is uses the libraries from the PHP directory/install. Overwriting the 2 Apache dlls with the dlls from the PHP directory did the trick. It now also runs under Apache. So your PHP version should match with the working dlls for the specific version. When it still doesn't work in the web interface. Please check that Apache isn't loading these dlls from a Windows System directory, specified earlier in your system defined path, which is picked up by Apache.

Frank