登录JIRA SOAP API [英] Login to jira soap api

查看:469
本文介绍了登录JIRA SOAP API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用JIRA SOAP API在C#中:

I try use jira soap api on c#:


  1. 在VS2010中创建新的项目

  2. 添加Web服务引用(JiraTest): http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl

  3. 写下一个code:

  1. create new project in VS2010
  2. add web service reference (JiraTest): http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl
  3. write next code:

static void Main(string[] args)
{
    var jiraLogin = "soaptester";
    var jiraPassword = "soaptester";
    var jiraClient = new JiraTest.JiraSoapServiceClient();
    var projects = jiraClient.getProjects();
}


但是,这code扔exepition说我还没有autentificate。
我试图找到登录方法,但它旁边签名:

But this code throw exepition that I'm not autentificate yet. I try find login method, but it have next signature:

public void login();

如果没有登录名和密码参数。
当我使用这种登录方式code扔exeption的登录信息或密码无效。而且我不知道,我必须设置我的凭据。

Where are no loginname and password parameters. When I use this login method code throw exeption that login or password invalid. And I don't known where I must set my credentials.

我怎么能前呼叫所需的方法与JIRA SOAP API登录?

How I can login with jira soap api before call needed method?

补充:看<一个href=\"https://developer.atlassian.com/display/JIRADEV/Creating+a+JIRA+SOAP+Client\">https://developer.atlassian.com/display/JIRADEV/Creating+a+JIRA+SOAP+Client

推荐答案

您可以试试这个

    JiraSoapServiceService jiraSoapService = new JiraSoapServiceService();

    public string Login(string user, string pwd)
    {
        string result = string.Empty;

        result = jiraSoapService.login(user, pwd);

        return result;

    }


    public void Logout(string token)
    {
        jiraSoapService.logout(token);
    }

这篇关于登录JIRA SOAP API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆