NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
NUSoap Problem with Windows server 2008 and proxy setings


Joined: 18 Jun 2009
Posts: 2
Location: Egypt,Cairo
Reply with quote
I wanted to test Nusoap , so I created soap server with this code
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
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
Code:
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 Smile
View user's profileFind all posts by babanesmaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Quote:
HTTP ERROR: Couldn't open socket connection to server http://localhost/soaptest/soap_server.php?wsdl, Error (10060):


Is there anything unclear? You do not have web server running on localhost, port 80, or it is blocked by your firewall. Nothing else.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Jun 2009
Posts: 2
Location: Egypt,Cairo
Reply with quote
Thanks dmitri

When I change localhost to 127.0.0.1 it works .
View user's profileFind all posts by babanesmaSend private message
NUSoap Problem with Windows server 2008 and proxy setings
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic