Anonymous - 2010-07-30

I've got the common newbie question:  the client issues a
"SOAP-ERROR: Parsing WSDL: Couldn't load from <http://serverlocation.php>"

I've copied and pasted the http:// address to the browser and the server is found, even issues debug statements.  But the client can't do it.

I'm on PHP 5.2.6   and nuSoap  1.123
I went into php.ini and made sure that  always_populate_raw_post_data = On
Also in php.ini, the soap extension is NOT loaded.

Here's the server:
<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
$debug=1;

// 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:

<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
// Create the client instance
//$client = new soapclient('http://h2.ideatree.us/challenge/soapserver.php');
$client = new soapclient('soapserver.php');
// Call the SOAP method
$result = $client->call('hello', array('name' => 'Scott'));
// Display the result
print_r($result);
// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
// Display the debug messages
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?>

Thanks for any help.