2012-06-12 23 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>