ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rachel Primrose <>
Subject RE: Newbie- any java samples
Date Thu, 18 Aug 2005 21:14:47 GMT

This url shows the java types that can be passed using XML-RPC. 
All objects passed must be one of these types, including objects stored
within other objects.
E.g A vector of strings is OK, however a vector of nodes is not.

This url has some examples about server side implementation.  Try the "Using
the Built-in HTTP Server" section.
webserver.addHandler ("examples", someHandler); is important.  someHandler
is a class that you must create.  Methods to be used by xmlrpc must have a
return value in the allowed types.  They cannot return null.

Try this code:

Create a class called TestHandler.class with one method, 

public String testMethod(String inString)
	return "hello world.  you passed in: "+inString;

Give it an empty constructor.

Create another test class to run, with this main method:

public static void main(String[] args)
		TestHandler testHandler=new TestHandler();
		WebServer webserver = new WebServer (10001);
		webserver.addHandler ("TestHandler", testHandler); 
		XmlRpcClientLite client=new
		Vector parameters=new Vector();
		parameters.add("hello xmlrpc server!");
	catch(Exception e)

There might be errors in this code, i didn't have time to test it, but it's
a start.  

-----Original Message-----
From: Nookala, Sridevi (Sridevi) []
Sent: Friday, 19 August 2005 6:23 a.m.
To: ''
Subject: Newbie- any java samples


I am newbies to XML-RPC web services. Can anybody point me where i could get
java examples for xml-rpc.

Especially how to pass java objects using XmlRpcClient synchronous calls


View raw message