Hi everybody.
following the post I did some time ago, I've reworked the XWiki XML
RPC implementation. The previous XML RPC code was rather messy and
contained a lot of duplicated code (basically the server side was re-
implementing the same domain model already available in the Swizzle
client-side jar). At first I managed to cut it down by basically
removing all the duplicated code and linking directly to the Swizzle
jar.
Then I started working on object manipulation and I basically ended up
with a complete rewrite.
The new implementation is then based on two components:
1) The domain model classes and the XML RPC client
2) The server side implementation of the API (that is an extension of
the Confluence one and uses the same domain model defined in 1)
Overall we have the following "features":
1) The new implementation, on the server side, makes use of the XWiki
Api wrapper (com.xpn.api.XWiki) instead of directly using the low
level objects. Though I am not an expert of the XWiki internals, I
think this is good for handling rights management (which is
transparently done by the wrapper)
2) The implementation looks more robust and simple.
3) On the client side we still have interoperability with confluence
and with the previous versions of XWiki.
There are, however, two potential "bugs":
1) The client side jar requires Java 5.0. Infact it uses reflection
and annotations to handle the "magic" of XML RPC communication (see
MapObject.java).
2) We are basically giving up on Swizzle.
The first "bug" can be easily solved, but this would lead to a less
elegant and more bloated solution.
The second "bug" is maybe political. Anyway if we want to go the
Swizzle way, I also have a cut-down implementation that still uses
swizzle (though I will need to patch the official swizzle-distribution
for adding XWiki specific features, and in this is actually like
having our own client)
The current implementation is not feature complete (though XEclipse
would already work fine with it and object edition could also be
implemented)
In the attachments you will find the current version of the
implementation so you can review it and discuss future directions or
issues:
org.xwiki.xmlrpc.tar.gz is the "client side" jar that will be used by
clients like XEclipse.
com.xpn.xwiki.xmlrpc3.tar.gz is the package that would, in case,
become part of XWiki.
WDYT?
Cheers,
Fabio