hi!
My name is ralph and i just started to experiment with the Apache Xml-Rpc library. since i wanted to call functions from phpgroupware i had to extend the XmlRpcClient class to accept hashtable parameters. I've created a patch, so maybe you find it useful. regards ralph
Index: src/java/org/apache/xmlrpc/XmlRpcClient.java =================================================================== RCS file: /home/cvspublic/xml-rpc/src/java/org/apache/xmlrpc/XmlRpcClient.java,v retrieving revision 1.4 diff -r1.4 XmlRpcClient.java 156a157,171 > public Object execute (String method, > Hashtable params) throws XmlRpcException, IOException > { > Worker worker = getWorker (false); > try > { > Object retval = worker.execute (method, params); > return retval; > } > finally > { > releaseWorker (worker, false); > } > } > 163c178 < public void executeAsync (String method, Vector params, --- > public void executeAsync (String method, Object params, 185a201 > 229c245 < synchronized void enqueue (String method, Vector params, --- > synchronized void enqueue (String method, Object params, 267c283 < public void start (String method, Vector params, --- > public void start (String method, Object params, 274a291,292 > > 289c307 < void executeAsync (String method, Vector params, AsyncCallback callback) --- > void executeAsync (String method, Object params, AsyncCallback callback) 310a329 > 315c334 < Vector params) throws XmlRpcException, IOException --- > Object params) throws XmlRpcException, IOException 394c413,414 < /** --- > > /** 398c418 < Vector params) throws IOException, XmlRpcException --- > Object params) throws IOException, XmlRpcException 405c425 < --- > 407,413c427,447 < int l = params.size (); < for (int i = 0; i < l; i++) < { < writer.startElement ("param"); < writeObject (params.elementAt (i), writer); < writer.endElement ("param"); < } --- > if (params instanceof Vector) > { > int l = ((Vector)params).size (); > for (int i = 0; i < l; i++) > { > writer.startElement ("param"); > writeObject (((Vector)params).elementAt (i), writer); > writer.endElement ("param"); > } > } > else > if (params instanceof Hashtable) > { > writer.startElement ("param"); > writeObject((Hashtable)params,writer); > writer.endElement ("param"); > } > else > { > throw new XmlRpcException (300,"XML-RPC: Invalid Request - Unsupported >parameter type."); //is this the right faultcode ? > } 417a452 > 438c473 < Vector params; --- > Object params; 445c480 < public CallData (String method, Vector params, --- > public CallData (String method, Object params,