13

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?

CCovey
  • 799
  • 1
  • 10
  • 17
Joe Barone
  • 3,112
  • 3
  • 24
  • 20

5 Answers5

13

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.

Luke Halliwell
  • 7,312
  • 6
  • 31
  • 31
  • I needed ?wsdl not .wsdl. +1 though. I'd +2 you if you'd linked to the docs ;) – Rob Fonseca-Ensor May 11 '10 at 12:56
  • 4
    For anyone reading this, there is now a v2: http://your_installation/rpc/soap/jirasoapservice-v2?wsdl – Ben Challenor Jun 03 '10 at 19:34
  • 2
    And the docs mentioned are at: http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html – Ben Challenor Jun 03 '10 at 19:46
13

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.

Patrik Lindström
  • 1,057
  • 3
  • 13
  • 23
10

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);
Andrew
  • 8,322
  • 2
  • 47
  • 70
  • 1
    Alternative solution if you cannot use the 'Add Web Reference': http://stackoverflow.com/a/22379843/766872 – anve Mar 13 '14 at 13:18
4

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

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

fixer_m
  • 51
  • 4
0

As per this page https://developer.atlassian.com/jiradev/support/archive/jira-rpc-services/creating-a-jira-soap-client/remote-api-soap-examples, JIRA SOAP API has been deprecated, and as per this page https://developer.atlassian.com/jiradev/latest-updates/soap-and-xml-rpc-api-deprecation-notice, completely removed from JIRA 7.0+.

I would recommend to go with JIRA REST API.

esylvestre
  • 1,850
  • 4
  • 21
  • 30