2012-06-12 20 views
1

我在使用id试图获取问题详细信息时遇到数字格式异常。JIRA中的数字格式例外

RemoteIssue ri = jira.getIssueById(JIRAtoken, string.Format(IssueKey)); 

这里jiratoken是字符串。但给予例外。任何人有任何想法?

+0

可不可以给详细? “jira”在什么情况下? RemoteIssue从哪个包? – Kuf

+1

问题的ID看起来像12345(不是TEST-1),并且是恒定的。 问题关键看起来像TEST-1,并且可能随时间而改变 – mdoar

+1

您可能想要使用getIssue而不是getIssueById – mdoar

回答

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>