Give the gift of Drupal. All merchandise is 50% off through 2016.
I have a simple SOAP question:
A SOAPcall is made in a commerce payment method (custom module) to an external url. Let's use a simple webservice for the example:
$client = new SoapClient('http://www.webservicex.net/ConvertTemperature.asmx?WSDL', array('exceptions'=>TRUE, 'cache_wsdl'=>WSDL_CACHE_NONE)); $result=$client->ConvertTemp(floatval(30), 'degreeCelsius', 'degreeFahrenheit');
Following error appears:
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in ... SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL' : failed to load external entity "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" in SoapClient->SoapClient() (......).
When adding the exact same code to the Drupal root directory in a php file, it simply works.
in the module: SOAP call is not working
in the web root: SOAP call is working
Additional info: when putting the wsdl file locally, everything works fine. But that's not the idea. It has to be an external wsdl.
Thanks in advance for a solution to this mysterious phenomenon.