xml-rpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: Making Invoker public?
Date Thu, 22 Aug 2002 17:22:14 GMT
Kevin Hester <kevinh@ispiri.com> writes:

> Hi,

Hi Kevin.

> Yesterday I began using the Apache XML-RPC library, and I must give praise: 
> This is a great library - it works well and it is very cleanly constructed.  
> However, I have run into one issue and I'd like to see if you want my fix.
> I have a number of objects which are currently using RMI, and as such they 
> have methods declared as void.  I've decided to encapsulate these objects in 
> an XML-RPC framework, but I would still like to have the option of using RMI. 
>  Everything works great except that the void functions return null when 
> invoked through the introspection API.
> It seemed to me that creating a glue class that implements the XmlRpcHandler 
> and uses introspection would be an ideal solution to this problem.  The glue 
> class could invoke the method on its target object, check for null return 
> value and substitute a value which is acceptable in XML-RPC land (i.e. 
> Integer(0)).

This sounds like a nice extension.  I'm not sure it's something that
we want on by default, but I wouldn't be against finding some way to
include it in the package.

> Of course, the glue class I'm describing is only a slight modification of 
> Invoker.  
> My solution: Make the invoker class public so that users can subclass it for 
> custom behavior.  In my case, I override execute to check for a null return 
> value.

Andrew Evers is currently working on refactoring the XmlRpcServer
class, splitting on its child classes and making it more reusable.  It
would be terrific if you could grab this small chunk of the work which
he has proposed.  See his recent message for details:


> My question to all:
> 1) Does this seem like a good solution?  It sure seems better than people 
> having to reinvent the introspection glue.

Yeah, sounds useful.

> 2) Do you want diffs for this minor change?

I defer to Andrew.  You guys can work it out.  :-)

Daniel Rall <dlr@finemaltcoding.com>

View raw message