.NET wrapper for JIRA api?

Deadly 提交于 2019-12-03 05:09:51

问题


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?


回答1:


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.




回答2:


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.




回答3:


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:


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

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




回答5:


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.



来源:https://stackoverflow.com/questions/338944/net-wrapper-for-jira-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!