By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,686 Members | 1,510 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,686 IT Pros & Developers. It's quick & easy.

Simple Nusoap Problem

P: n/a
Hello. I am having what is probably the simplest problem there is with
Nusoap. I have to admit I'm new to this stuff, but I have some
programming experience and what I'm doing *shouldn't* be hard. First
thing I tested the Hello (sample server and client) that are in the
Readme file. No problem. Then I tried to accepting the data from the
URL string (GET). That worked. Then I tried two parameters and the
only output I get is the word "Array". I've tried it with two
completely different scripts. I've tried all kinds of ways of loading
the arrays, and I tried echoing the array values in the client script
just to be sure they are there and they are. I'm sure I have the
latest version of nusoap.php. I searched the newsgroups for anyone
with a similar problem and couldn't find it. Any clues you could
provide would be greatly appreciated. Here's the script I'm using.

<?php

require_once('nusoap.php');
$parameters = array('name1'=>$_GET['name1'], 'name2'=>$_GET['name2]);
$soapclient = new soapclient('http://www.myserver.net/soapserverhello.php');
echo $soapclient->call('hello', $parameters);

?>

Thank you.
-Larry.
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
hi larry,

the soap client is looking fine.

please make sure that the method of the soap server is taking more then one parameter.

require_once "nusoap.php";

function hello($arg1, $arg2)

{

$res = $arg1 . $arg2;

return $res;

}

$soap = new soap_server;

$soap->register("args");

$soap->service($HTTP_RAW_POST_DATA);
cheers,
moe.

<?php

require_once('nusoap.php');
$parameters = array('name1'=>$_GET['name1'], 'name2'=>$_GET['name2]);
$soapclient = new soapclient('http://www.myserver.net/soapserverhello.php');
echo $soapclient->call('hello', $parameters);

?>

Jul 17 '05 #2

P: n/a
Thanks. I did include two arguments to the function. I even commented
out the faults. Here's what I have. I swear this is the toughest time
I've had with a simple program.

<?php

require_once('nusoap.php');
function hello($name1, $name2){
// optionally catch an error and return a fault
/*if($name1 == ''){
return new soap_fault('Client','','Must supply a valid name.');
}
if($name2 == ''){
return new soap_fault('Client','','Must supply a valid name.');
}*/
$res_str = "hello " . $name1 . " " . $name2;
return $res_str;
}

$s = new soap_server;
$s->register('hello');
$s->service($HTTP_RAW_POST_DATA);

?>
Timo Schäfer <ti***********@media-art.net> wrote in message news:<c1*************@news.t-online.com>...
hi larry,

the soap client is looking fine.

please make sure that the method of the soap server is taking more then one parameter.

require_once "nusoap.php";

function hello($arg1, $arg2)

{

$res = $arg1 . $arg2;

return $res;

}

$soap = new soap_server;

$soap->register("args");

$soap->service($HTTP_RAW_POST_DATA);
cheers,
moe.

<?php

require_once('nusoap.php');
$parameters = array('name1'=>$_GET['name1'], 'name2'=>$_GET['name2]);
$soapclient = new soapclient('http://www.myserver.net/soapserverhello.php');
echo $soapclient->call('hello', $parameters);

?>

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.