Deploying an XML-RPC service within JIRA
In the previous recipe, we have seen how to deploy a SOAP service within JIRA. In this one, we will see how to deploy an XML-RPC service.
Getting ready
Create a skeleton plugin using the Atlassian Plugin SDK. Here again, make sure the Accept remote API Calls option is turned ON, as in the previous recipe.
How to do it...
As in the case of the SOAP plugin, let us expose a new method, getProjectCategories
, that retrieves all the
project categories in the project. The following are the steps:
Add the RPC plugin dependency in the
pom.xml
file to get hold of the existing RPC classes. Change the version accordingly:<dependency> <groupId>atlassian-jira-rpc-plugin</groupId> <artifactId>atlassian-jira-rpc-plugin</artifactId> <version>5.0.5</version> </dependency>
Declare the new RPC service in
atlassian-plugin.xml
:<rpc-xmlrpc key="xmlrpc" name="JTricks XML-RPC Services" class="com.jtricks.XmlRpcServiceImpl...