I wanted to test Nusoap , so I created soap server with this code
<?php
// Pull in the NuSOAP code
require_once('lib/nusoap.php');
// Create the server instance
$server = new soap_server();
// Initialize WSDL support
$server->configureWSDL('hellowsdl', 'urn:hellowsdl');
// Register the method to expose
$server->register('hello', // method name
array('name' => 'xsd:string'), // input parameters
array('return' => 'xsd:string'), // output parameters
'urn:hellowsdl', // namespace
'urn:hellowsdl#hello', // soapaction
'rpc', // style
'encoded', // use
'Says hello to the caller' // documentation
);
// Define the method as a PHP function
function hello($name) {
return 'Hello, ' . $name;
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?> |
and the client with this code
<?php
require_once('lib/nusoap.php');
$client = new nusoap_client('http://localhost/soaptest/soap_server.php?wsdl',true);
$result = $client->call('hello',array('name'=>'adham'));
print_r($result);
echo $client->getError();
?> |
I got this error every time
wsdl error: HTTP ERROR: Couldn't open socket connection to server http://localhost/soaptest/soap_server.php?wsdl, Error (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. |
I am working on windows vista , we have windows server 2008 with proxy settings .
any help will be appreciated