Simple Nusoap Problem

This is a discussion on Simple Nusoap Problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hello. I am having what is probably the simplest problem there is with Nusoap. I have to admit I'm ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2004
Larry Sankey
 
Posts: n/a
Default Simple Nusoap Problem

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.
Reply With Quote
  #2 (permalink)  
Old 02-25-2004
Timo Schäfer
 
Posts: n/a
Default Re: Simple Nusoap Problem

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);
>
>?>
>
>

Reply With Quote
  #3 (permalink)  
Old 02-27-2004
Larry Sankey
 
Posts: n/a
Default Re: Simple Nusoap Problem

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 <timo.schaefer@media-art.net> wrote in message news:<c1j79l$l6d$07$1@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);
> >
> >?>
> >
> >

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:21 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0