13
votes

I'm working on a JIRA implementation and need to make use of the API.

Does anyone know of an existing .NET wrapper for the JIRA SOAP API?

5

5 Answers

13
votes

In a Visual Studio .NET project, right click the project references and choose 'Add Service Reference', enter the URL of JIRA's WSDL descriptor (http://your_installation/rpc/soap/jiraservice-v1.wsdl), and Visual Studio will auto-generate a .NET class for accessing the JIRA SOAP API.

The parameter names aren't particularly meaningful so you'll need to refer back to the documentation quite a bit at first.

13
votes

In Visual Studio .Net 2010 choose menu Project and Add Service Reference. In the dialogue choose advanced option. Then in the new dialogue choose Add Web Reference. http://localhost:8080/rpc/soap/jirasoapservice-v2?wsdl where localhost:8080 is your installation of jira. I did not get it to work in VS2010 with just Add Service Ref. It then only created methods without any parameters. For example the login method claims to have no arguments althought the [documentation](http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html#login(java.lang.String, java.lang.String)) says there should be a user and a password parameter. See this jira forum for more info in the matter. I did not need to use the old program Wsdl.exe. But I do not get any intellisense of the parameters more then what type it is like:

this.JiraSrvTalker.createIssue(string In0 and,RemoteIssue In1)

To know that the first parameter should be a token from

this.LoginToken = this.JiraSrvTalker.login(JiraAdmin, JiraAdminPwd);

you have to check documentation.

10
votes

I was also unable to get parameters on the methods when using a service reference. What I had to do was a strange 'add web reference' trick.

  1. Add Service Reference
  2. Click 'Advanced...', in the lower left corner
  3. Click 'Add Web Reference...', also in the lower left corner
    1. http://<servername>/rpc/soap/jirasoapservice-v2?wsdl

You will now have a 'Web Reference' folder under service references, with the <servername> as the name.

var jira = new com.myserver.JiraSoapServiceService();
var loginToken = jira.login("user", "pass");
var issue = new com.myserver.RemoteIssue();
jira.createIssue(loginToken, issue);
4
votes

JIRA SOAP API has been deprecated. So use REST API instead.

Here is JIRA REST API .NET wrapper: Atlassian.Net SDK