Your service method is something like
function mymethod(...) {
...
return array("id"=>$id,"message"=>$message);
}
Your client might look something like
$client = new soapclient("http://myhost/myserver.php");
$params = array('param1' => 'value1', 'param2' => 'value2');
$result = $client->call('mymethod', $params);
echo 'id is ' . $result['id'] . '<br/>';
echo 'message is ' . $result['message'] . '<br/>';
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Daniel Pozzi" <pozzi@xxxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, April 26, 2005 8:34 AM
Subject: [Nusoap-general] remove headers from response or easily fetch response
values
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there.
>
> I'm a soap newbie and need some help. I managed to set up client and
> server, but the server response I get is header plus xml. I need just
> two simple values from the response, nothing special. the server's php
> function returns:
>
> return array("id"=>$id,"message"=>$message);
>
> pretty simple and that seems to work, since the corect values are in
> the response (graved deep in xml though). how can I fetch these two
> easily?
>
> Thanks!
>
> Dipl.Oecotroph. Daniel Pozzi
> Section of Appliance Technology
> University of Bonn
> +49 (0)228 732384
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
>
> iD8DBQFCbjVcKmWYJcHN8GoRApZkAJkBopS1G+ZoCRJPyIGoNaRrEun3MwCfZAoc
> 74QRaIF8NARKfhey83Rb4Cg=
> =lDBn
> -----END PGP SIGNATURE-----
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Nusoap-general mailing list
> Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/nusoap-general
>
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
|