ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wiedmann <>
Subject Announce: Generator for XML-RPC Clients
Date Sun, 12 Sep 2004 20:25:37 GMT


I'd like to announce the availability of the


a tool for generation of clients for Apache XML-RPC.

What it does: Given a set of server classes (either Java sources or 
compiled classes), it generates a corresponding set of client classes 
with the same signature and an XmlRpcHandler, that dispatches incoming 
XML-RPC calls to the server classes. For example, if you have the 
following server class:

     public class Calculator {
         public int add(int i1, int i2) {
	    return i1 + i2;
         public double multiply(double d1, double d2) {
             return d1 * d2;

The generated client class will look similar to

     public class Calculator {
	private XmlRpcCaller caller;
	public Calculator(caller) {
	    this.caller = caller;
         public int add(int i1, int i2) {
             Vector v = new Vector();
             v.add(new Integer(i1));
             v.add(new Integer(i2));
             XmlRpcClient c = new XmlRpcClient(url);
             Object o = caller.xmlRpcCall("Calculator.add", v);
             return ((Integer) o).intValue();
         public double add(double d1, double d2) {
             Vector v = new Vector();
             v.add(new Double(d1));
             v.add(new Double(d2));
             Object o = caller.xmlRpcCall("Calculator.add", v);
             return ((Double) o).doubleValue();

In other words, by using the generator, your XML-RPC client becomes

   - type safe
   - better readable (no need for casting primitives, and the like)
   - marginally faster (no reflection on the server side)


for the generators docs. The generator is currently only available as a 
part of the JaxMe Java sourge generator framework's CVS HEAD version. 
See for details on JaxMeJS. See for instructions on how to 
checkout the CVS HEAD.



View raw message