You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by daniel martin <dm...@nextware.de> on 2002/05/22 16:58:20 UTC

execute void

Hi List!


XML-RPC works fine if i execute methods which return a value.
but if i execute a void method, the method is executed and then the following error will be thrown:

org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: null value not supported by XML-RPC


is there another implementation of XMLRPCClient.execute which supports void calls?

or is there another way to do this?


thanks
daniel.

Re: execute void

Posted by Rick Blair <bl...@xanadu.ds.boeing.com>.
The problem boils down to null not being a supported data type.  XMLRPC is a 
call/return paridigm.  All methods must return something.  The approach we 
took is that all "void" methods return a boolean status.  The below approach 
is also very workable, we just had way too many calls to modify.

Cheers

Rick

On Wednesday 22 May 2002 08:12, Todd Berman wrote:
> This doesnt really answer your question, but I recommend always returning
> something.
>
> In all of the XMLRPC i write the server always returns a hash, and the
> hash ALWAYS contains a return code
>
> You can always ignore the returned hash if you dont need the info.
>
> On Wed, 22 May 2002, daniel martin wrote:
> > Hi List!
> >
> >
> > XML-RPC works fine if i execute methods which return a value.
> > but if i execute a void method, the method is executed and then the
> > following error will be thrown:
> >
> > org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: null value
> > not supported by XML-RPC
> >
> >
> > is there another implementation of XMLRPCClient.execute which supports
> > void calls?
> >
> > or is there another way to do this?
> >
> >
> > thanks
> > daniel.

Re: execute void

Posted by Rick Blair <bl...@xanadu.ds.boeing.com>.
The problem boils down to null not being a supported data type.  XMLRPC is a 
call/return paridigm.  All methods must return something.  The approach we 
took is that all "void" methods return a boolean status.  The below approach 
is also very workable, we just had way too many calls to modify.

Cheers

Rick

On Wednesday 22 May 2002 08:12, Todd Berman wrote:
> This doesnt really answer your question, but I recommend always returning
> something.
>
> In all of the XMLRPC i write the server always returns a hash, and the
> hash ALWAYS contains a return code
>
> You can always ignore the returned hash if you dont need the info.
>
> On Wed, 22 May 2002, daniel martin wrote:
> > Hi List!
> >
> >
> > XML-RPC works fine if i execute methods which return a value.
> > but if i execute a void method, the method is executed and then the
> > following error will be thrown:
> >
> > org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: null value
> > not supported by XML-RPC
> >
> >
> > is there another implementation of XMLRPCClient.execute which supports
> > void calls?
> >
> > or is there another way to do this?
> >
> >
> > thanks
> > daniel.

Re: execute void

Posted by Todd Berman <tb...@chopper.slackworks.com>.
This doesnt really answer your question, but I recommend always returning 
something.

In all of the XMLRPC i write the server always returns a hash, and the 
hash ALWAYS contains a return code

You can always ignore the returned hash if you dont need the info.

On Wed, 22 May 2002, daniel martin wrote:

> Hi List!
> 
> 
> XML-RPC works fine if i execute methods which return a value.
> but if i execute a void method, the method is executed and then the following error will be thrown:
> 
> org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: null value not supported by XML-RPC
> 
> 
> is there another implementation of XMLRPCClient.execute which supports void calls?
> 
> or is there another way to do this?
> 
> 
> thanks
> daniel.
> 


Re: execute void

Posted by Todd Berman <tb...@chopper.slackworks.com>.
This doesnt really answer your question, but I recommend always returning 
something.

In all of the XMLRPC i write the server always returns a hash, and the 
hash ALWAYS contains a return code

You can always ignore the returned hash if you dont need the info.

On Wed, 22 May 2002, daniel martin wrote:

> Hi List!
> 
> 
> XML-RPC works fine if i execute methods which return a value.
> but if i execute a void method, the method is executed and then the following error will be thrown:
> 
> org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: null value not supported by XML-RPC
> 
> 
> is there another implementation of XMLRPCClient.execute which supports void calls?
> 
> or is there another way to do this?
> 
> 
> thanks
> daniel.
>