logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

NuSOAP examples not working ...: msg#00016

Subject: NuSOAP examples not working ...
Hello there,

I am an experienced PHP developer but am new to
NuSOAP.

I am trying to develop some simple web serves using
NuSOAP but I cannot even get the simple examples to
work. I am trying to
run them locally using Apache 2.2.4 and PHP v5.2 on
Win XP HE  

Here is my client:

<?php
require_once('nusoap.php');
$client = new
soapclient('http://127.0.0.1/WS//helloserver.php');
$return = $client->call('hello', array('bob'));
print_r($return);
?>

Here is my server:

<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
// Create the server instance
$server = new soap_server;
// Register the method to expose
$server->register('hello');
// 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);
?>

Whwn I run the client, I get this:

Array ( [faultcode] => Client [faultactor] =>
[faultstring] => error in msg parsing: xml was empty,
didn't parse! [detail] => ) 

THe view source looks like this:

Array
(
    [faultcode] => Client
    [faultactor] => 
    [faultstring] => error in msg parsing:
xml was empty, didn't parse!
    [detail] => 
) 

Why does't this simple code work ? Any advice would be
appreciated ...

THanks,


Steven Matthews



                
___________________________________________________________ 
The all-new Yahoo! Mail goes wherever you go - free your email address from 
your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


<Prev in Thread] Current Thread [Next in Thread>