Hello all,
I'm having an issue using NuSOAP. When I try the following code:
<?php
include('./includes/lib/nusoap.php');
$s = new soapclient('http://soap.amazon.com/schemas2/AmazonWebServices.wsdl','wsdl');
$s->debug_flag=true;
$s->setHTTPProxy('proxy.mycompany.com',80);
$p = $s->getproxy();
echo $s->debug_data;
?>
I get the following error (the first two lines are echo's I put into the nusoap.php file):
before fsockopen()
bad path to WSDL file.
Warning: Invalid argument supplied for foreach() in /data/wms/www-uat/htdocs/includes/lib/nusoap.php on line 3807
It's seems that it can not find the WSDL file when trying to connect to it via the fsockopen() function. Although when I copy the WSDL URL (http://soap.amazon.com/schemas2/AmazonWebServices.wsdl) into my browser it comes back with a valid WSDL page.
The Warning appears to be caused by the problem with connecting to the WSDL site in the first place.
My environment is the following: Windows XP box running Apache 2.0.43 with PHP 4.3.0. I have also tested it on a Linux box with Apache 1.3.27 with PHP 4.2.3 with the same results.
To install NuSOAP I simply downloaded the nusoap.php file. Are there other changes necessary in the php.ini file or maybe the httpd.conf Apache file? Could this be something to do with the proxy server that I'm behind, although I do specify it with the setHTTPProxy() method.
Any help would be much appreciated.