Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Cannot retrieve issues from Jira via SOAP API

Martin Nielsen September 14, 2011

Hi!

I have a problem getting issues out from our Jira system, and I cannot figure out why this is. We are using the latest version of Jira, I'm using Visual Studio, .NET 4 and C#.

I have added a Web Reference for the SOAP API and I can call it just fine. I can get projects, users, comments, issuetypes, etc. out just fine. When I try getting issues out, the picture changes. I get a HTTP 200 back, but the response is 0.

Is this a serverside problem, a setup problem or what can it be? I know I am calling the API correctly.

Any help would be appreciated.

//Martin

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2011

Could be a security thing for that issue? But if you're using the same user for SOAP as when you log in, that wouldn't be it. Time to increase the logging on the server side to see what it thinks it's returning?

Martin Nielsen September 15, 2011

As fate would have it, I get an exception on the server. Here is part of the stack trace (since full stack trace is too long to post in a comment):

2011-09-16 08:13:55,574 http-80-6 WARN anonymous 493x554868x1 - 172.31.4.145 /rpc/soap/jirasoapservice-v2 [directory.ldap.mapper.UserContextMapper] Failed to map attribute <uSNChanged> from context with DN <cn=Martin Bræmer Nielsen,ou=U
java.lang.NullPointerException
at com.atlassian.crowd.directory.ldap.mapper.attribute.USNChangedMapper.getValues(USNChangedMapper.java:28)
at com.atlassian.crowd.directory.ldap.mapper.UserContextMapper.mapFromContext(UserContextMapper.java:57)
at org.springframework.ldap.core.ContextMapperCallbackHandler.getObjectFromNameClassPair(ContextMapperCallbackHandler.java:67)

Anything you can make any sense of?

Vincent Beau September 15, 2011

Judging from what you get, I think you should get in touch with the atlassian customer support directly.

MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2011

Looks like the username you are using in SOAP is not known to JIRA, or perhaps an instance of Crowd you're using?

0 votes
Vincent Beau September 14, 2011

Have you tried retrieving an issue using SOAPUI?(remember to log in first)

This way you should be able to see what's really coming from your Jira.

The SOAP behaviour is kind of tricky, it's easy to make mistakes and even though there is a problem, you can still get a HTTP200.

Martin Nielsen September 14, 2011

I use Fiddler, what can SoapUI do that Fiddler cant? I don't think I have to manipulate the request I'm sending. The code I'm using is generated from the SOAP service wsdl and I can't see any errors in the XML request I'm sending.. But you're saying it might be faulty generation of my service code?

Martin Nielsen September 14, 2011

Well.. This call is the one that gives me nothing:

var issue = _service.getIssue(token, "TELE-2130");

If I go to our Jira site and type /browse/TELE-2130 I get to the issue just fine. So what can I be doing wrong? I don't really see it. As I said, I can get projects, comments, users, issuetypes and everything else, but issues just return 0 as response. Even on getIssuesFromFilter, getIssuesFromJqlSearch, etc. basically anything that returns a RemoteIssue or an array of them

Edit: A couple of weeks ago we could pull issues out via SOAP just fine, but then we updated to the latest version. Also, doesn't the web one use XMLRpc to parse? Guess I could try calling with XMLRpc.

Vincent Beau September 14, 2011

Using fiddler is fine!

Actually I'm just saying that the SOAP Interface behaviour is kinda strange.

Indeed, even if your SOAP request is well formed but concerns irrelevant data, you'll still get a HTTP 200 with nothing as a SOAP Response.

I eventually figured this out when I tried to update an issue field that was not present in the Project's fields.

What I'm saying is:

If Jira doesn't provide you with the material you're requesting

  • Check if you can access the data through a browser
  • In your case make sure that you're using the issue key and not the issue id

The issue key is like <project code><issue number> (SUPP-102)

Basically the SOAP interface behaves the same as the Web one.

If you can get it in the Web one but not in SOAP it means that you're doing it wrong (at least, not as the Atlassian devs wanted you to do)

TAGS
AUG Leaders

Atlassian Community Events