logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Can't get data from server - total newb: msg#00024

Subject: Can't get data from server - total newb
Hi All:

Sorry for the total newb question, but I'm trying to develop my first
server with nusoap, but I can't seem to get any data returned - I keep
getting the html from the webDescription function (and, if I disable
that, the error "no data present after HTTP headers"). I searched
through the archives to no avail.

The server should take a string token and return an array

Here's my server code:

require_once('nusoap.php');
$ns="[snip].php";
$server = new soap_server;
$server->configureWSDL('GetUserData', $ns);
$server->wsdl->schemaTargetNamespace = $ns;

$server->register('GetUserData', array('token' => 'xsd:string'),
array('returnvar' => 'xsd:array'));

function GetUserData ($token)
{       
        $returnvar = array (
                                "userid"=>"", 
                                "firstName"=>"", 
                                "lastName"=>"", 
                                [snip] 
                                "info_fld0"=>""
                                );
        $soapval = new soapval('returnvar','xsd:array',$returnvar);
        return $soapval;
}
$server->service($_SERVER['HTTP_RAW_POST_DATA']);

Here's the test client code:

require_once('nusoap.php'); 
$wsdl="[snip].php?wsdl";
$client=new soapclient($wsdl, true);

$param=array("token"=>$_GET["token"]);
$result = $client->call('GetUserData', $param);

echo("<pre>".htmlentities($client->request)."</pre>");
echo("<pre>".htmlentities($client->response)."</pre>");

I appreciate any help you can give...

Thanks

Geoff


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php


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