Writing a Java XML-RPC client
In the previous recipes, we saw how to create a SOAP client and use it to connect to JIRA from an external third-party application. We have also seen ways of exposing new methods in JIRA through SOAP and XML-RPC interfaces. In this recipe, we will see how to invoke an XML-RPC method from a client application written in Java.
The Javadocs for XML-RPC client can be found at: http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/xmlrpc/XmlRpcService.html.
Getting ready
Make sure Accept Remote API Calls option is turned ON in JIRA under Administration | Global Settings.
How to do it...
Let us try to retrieve the list of projects using XML-RPC service deployed within JIRA. Following are the steps:
Create a Maven2 project and add the dependency for
Apache2 xml-rpc
libraries.<dependency> <groupId>xmlrpc</groupId> <artifactId>xmlrpc</artifactId> <version>1.1</version> </dependency...