Discussion:
[Nusoap-general] wsdl no input parameter
Richard Chamberlain
2004-04-10 22:49:13 UTC
Permalink
Hello,

To begin with let me qualify that I'm both a SOAP and NuSOAP newbie, so
it could simply be a misunderstanding on my part.

Basically I want to register a function that takes no parameters, using
wsdl.

This is what I've got:

$server->register('get_all_documents',
false,
array('return' => 'tns:DocumentHeaderArray'),
$NAMESPACE,
'urn:jadu_documents_wsdl#get_all_documents',
'rpc',
'encoded',
'Return the complete set of document headers'
);

I looked at the implementation of register in nusoap.php and see that by
default the input is false and so I'm guessing the above is what I need
to do. Doesn't appear to work though :-/

Firstly loading the page without wsdl gives me 'Warning: Invalid
argument supplied for foreach() in
/home/kbcouncil/public_html/soap/nusoap.php on line 2929'. Secondly my
soap client complains about incorrect parameters.

Any suggestions?

Many thanks,

Richard
Scott Nichol
2004-04-11 17:19:33 UTC
Permalink
Try an empty array instead of false.

$server->register('get_all_documents',
array(),
array('return' => 'tns:DocumentHeaderArray'),
$NAMESPACE,
'urn:jadu_documents_wsdl#get_all_documents',
'rpc',
'encoded',
'Return the complete set of document headers'
);

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: "Richard Chamberlain" <***@sunsetandlabrea.com>
To: <nusoap-***@lists.sourceforge.net>
Sent: Saturday, April 10, 2004 6:49 PM
Subject: [Nusoap-general] wsdl no input parameter


Hello,

To begin with let me qualify that I'm both a SOAP and NuSOAP newbie, so
it could simply be a misunderstanding on my part.

Basically I want to register a function that takes no parameters, using
wsdl.

This is what I've got:

$server->register('get_all_documents',
false,
array('return' => 'tns:DocumentHeaderArray'),
$NAMESPACE,
'urn:jadu_documents_wsdl#get_all_documents',
'rpc',
'encoded',
'Return the complete set of document headers'
);

I looked at the implementation of register in nusoap.php and see that by
default the input is false and so I'm guessing the above is what I need
to do. Doesn't appear to work though :-/

Firstly loading the page without wsdl gives me 'Warning: Invalid
argument supplied for foreach() in
/home/kbcouncil/public_html/soap/nusoap.php on line 2929'. Secondly my
soap client complains about incorrect parameters.

Any suggestions?

Many thanks,

Richard




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
Richard Chamberlain
2004-04-11 17:33:15 UTC
Permalink
Hi Scott,
Post by Scott Nichol
Try an empty array instead of false.
$server->register('get_all_documents',
array(),
array('return' =3D> 'tns:DocumentHeaderArray'),
$NAMESPACE,
'urn:jadu_documents_wsdl#get_all_documents',
'rpc',
'encoded',
'Return the complete set of document headers'
);
Thanks for the reply.

I should have mentioned the things I'd already tried: array(), 0, false
and null. All have the same problem, that is the error on the page and
the soap client fails with incorrect parameters.

Any other ideas?

Thanks again,

Richard
Scott Nichol
2004-04-11 20:11:12 UTC
Permalink
I should have mentioned the things I'd already tried: array(), 0, false
and null. All have the same problem, that is the error on the page and
the soap client fails with incorrect parameters.
<<<<

What exactly is "the error on the page"? Can you give more details about "soap client fails with incorrect parameters"?

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.
Richard Chamberlain
2004-04-11 20:32:02 UTC
Permalink
Hi,
Post by Richard Chamberlain
I should have mentioned the things I'd already tried: array(), 0, false
and null. All have the same problem, that is the error on the page and
the soap client fails with incorrect parameters.
<<<<
What exactly is "the error on the page"? Can you give more details =
about "soap client fails with incorrect parameters"?
Actually my apologies. The error (Warning: Invalid argument supplied for
foreach() in /home/kbcouncil/public_html/soap/nusoap.php on line 2929)
only occurs when using false, and not an empty array. I thought as the
default parameters for register are false that that was the way to go.

Also I think the other issue is with my soap client as I've just created
a client using nusoap and everything works as expected.

So both things were my fault!

Thanks for the help,

Richard
Scott Nichol
2004-04-12 16:44:11 UTC
Permalink
If you are not able to get your SOAP client working, feel free to post to this list for more help.

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: "Richard Chamberlain" <***@sunsetandlabrea.com>
To: "Scott Nichol" <***@scottnichol.com>
Cc: <nusoap-***@lists.sourceforge.net>
Sent: Sunday, April 11, 2004 4:32 PM
Subject: Re: [Nusoap-general] wsdl no input parameter


Hi,
Post by Richard Chamberlain
I should have mentioned the things I'd already tried: array(), 0, false
and null. All have the same problem, that is the error on the page and
the soap client fails with incorrect parameters.
<<<<
What exactly is "the error on the page"? Can you give more details =
about "soap client fails with incorrect parameters"?
Actually my apologies. The error (Warning: Invalid argument supplied for
foreach() in /home/kbcouncil/public_html/soap/nusoap.php on line 2929)
only occurs when using false, and not an empty array. I thought as the
default parameters for register are false that that was the way to go.

Also I think the other issue is with my soap client as I've just created
a client using nusoap and everything works as expected.

So both things were my fault!

Thanks for the help,

Richard




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick

Loading...