Hi, I am learning “SOAP web services” using “NuSOAP” I tried to
execute hello world program, but it didn’t work. When I execute the
server script It generate the wsdl without giving any warning or
error. But when I execute the client it gives following message.
” Warning: SoapClient::SoapClient(http://localhost/nusoap/server.php?wsdl)
[soapclient.soapclient]: failed to open stream: 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. in E:\xampp\htdocs\nusoap\client.php on
line 5

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning
: failed to load external entity
"http://localhost/nusoap/server.php?wsdl"; in
E:\xampp\htdocs\nusoap\client.php on line 5

Fatal error: Maximum execution time of 60 seconds exceeded in
E:\xampp\htdocs\nusoap\client.php on line 10
.I have attached “client.php” and “server.php”.

// Pull in the NuSOAP code
// 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
// Pull in the NuSOAP code
// Create the client instance
$client = new soapclient("http://localhost/nusoap/server.php?wsdl";);
// Call the SOAP method
$result = $client->call('hello', array('name' => 'Scott'));
// Display the result
This examples is taken from the
can anybody tell me what’s wrong with this code.

Thank you

<<attachment: client.php>>

<<attachment: server.php>>

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to