This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call an XML-RPC method from Java Code

Sreekanth Kalakanti
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi everyone,

I need to call a remote method getUserDetails methods of an API (lets say XAPI) the request for this in the XMl format is given as below:
<request version="2.0">
<target name="XAPI" operation="getUserDetails">
so from my Java code how do i need to construt the parameters for the above xml request with username and domain as parameters.

My java code looks like

[code=java] XmlRpcClient server = new XmlRpcClient("");

Vector params = new Vector();
params.addElement(new String("xxxx"));
params.addElement(new String(""));
Object errorCode = server.execute("XAPI.getUserDetails", params);

I am able to connect to the Xml-Rpc Server(, but i am getting Invalid Parameters as Response . My Doubt here is how to set those parameter values as in the above xml format and send to XML-RPC server? so any one can guide me so that i can move in a Right path.

Thanks &Regards,

I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic