xml-rpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <aev...@redwood.nl>
Subject [PATCH]: Alternative type mappings for primitive types.
Date Fri, 09 Aug 2002 08:56:58 GMT
> Andrew, sounds interesting.  Maintaing custom patches is never fun;
> let's have a look at it.

See attached patch TypeFactory-AE-20020809.txt and new files
TypeFactory.java and TypeFactoryBase.java. This builds OK on
my machine, and our product runs OK with it too.

As far as the patch goes, I modified my original Integer only
patch to support the other data types. I basically shifted the
contents of the characterData method into the TypeFactoryBase
class, along with the dateformat member, and removed the
ParseException import in XmlRpc.

I had to modify the XmlWriter as well, since it uses the XmlRpc
dateformat member. This had a TODO next to it, so I just gave
it its own dateformat member.

I've modified XmlRpcServer and WebServer, but not SecureWebServer,
that will come if the patch is accepted. It would be nice to
have a factory for creating WebServer's anyway.

> JUnit tests for the existing interfaces and for any new code would be
> VERY helpful as well.

We use JUnit internally, so I think I could put together some basic
a) check that each of the methods in TypeFactory is called for a
   suitably crafted request.
b) check the behaviour (with corner cases) of the TypeFactoryBase.
c) check that an arbitrary TypeFactory instance doesn't throw
   an exception on an accepted set of 'legal' values.

As far as tests for other interfaces go, I am interested in
contributing both new code and more tests. I would like to
look into restructuring the way decoding works so that thread
handling on the server side can be better specified by the
user. Ideally to allow the request and response to be handled
by different threads.


View raw message