JIRA中的数字格式异常

时间:2012-06-12 10:22:20

标签: jira jira-plugin

我在使用id。

尝试获取问题详细信息时遇到数字格式异常
RemoteIssue ri = jira.getIssueById(JIRAtoken, string.Format(IssueKey));

此处jiratoken是字符串。但是给予例外。有人有任何想法吗?

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,使用了JIRA(4)的SOAP Web服务API。

我使用 getIssue 代替getIssueById解决了这个问题。使用getIssue,JIRA期望像MYPROJECT-3这样的密钥。

现在我发送这样的请求,它可以工作:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://soap.rpc.jira.atlassian.com">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:getIssue soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <in0 xsi:type="xsd:string">MyAuthToken</in0>
         <in1 xsi:type="xsd:string">MYPROJECT-1</in1>
      </soap:getIssue>
   </soapenv:Body>
</soapenv:Envelope>