Missed Team ’24? Catch up on announcements here.

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

Unable to connect to jira through soap api

Narayanarao Kancharla March 13, 2013

I am trying to connect to jira using soap api. The url of the server is https://issuetracking.customer.net/jira1/rpc/soap/jirasoapservice-v2.

But then I am getting an error 301 the document has moved permanently to https://jira.atlassian.com/rpc/soap/jirasoapservice-v2 and in the next line mentioned is

Apache/2.2.3 (Red hat) server at jira.atlassian.com port 80.

Could any one please help me on this.

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Narayanarao Kancharla March 31, 2013

Enabling the soap service solved the issue. Thanks.

0 votes
Onkar Ahire
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.
March 31, 2013

Try this ,

String baseUrl = " http://localhost:8080/rpc/soap/jirasoapservice-v2?wsdl";

SOAPSession soapSession = new SOAPSession(new URL(baseUrl));

soapSession.connect("admin","admin");

JiraSoapService jiraSoapService = soapSession.getJiraSoapService();

String authToken = soapSession.getAuthenticationToken();

0 votes
Séb P.
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.
March 13, 2013

Is the soap interface enabled on the production server (look at Jira -> Administraiton -> System -> General Configuration -> Accept Remote API Calls)

More infos: https://developer.atlassian.com/display/JIRADEV/Creating+a+JIRA+SOAP+Client

0 votes
Jobin Kuruvilla [Adaptavist]
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.
March 13, 2013

How are you creating the connection?

Narayanarao Kancharla March 13, 2013

Hi Jobin, I am trying to connect from a windows application through remote api call.

Steps for connection:

1. Adding the reference to the web service

2. login to jira using remote login

3. Getting the remote issues.

Please suggest.

Jobin Kuruvilla [Adaptavist]
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.
March 13, 2013

You might want to share the code for Step 1. Where are you using the url?

Narayanarao Kancharla March 13, 2013

Hi Rajesh, here is the code.

JiraSoapServiceService PB_oJiraServer = new JiraSoapServiceService();
PB_oJiraServer.Timeout = 1000000;
PB_oJiraServer.Url = "http://JIRAURL/rpc/soap/jirasoapservice-v2";
PB_strJiraToken = PB_oJiraServer.login(username, password);
jiraProjList = PB_oJiraServer.getProjectsNoSchemes(PB_strJiraToken);

This is working fine on a test instance but not for the production instance.

Jobin Kuruvilla [Adaptavist]
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.
March 13, 2013

So, where are you using the Url here? Try:

JiraSoapServiceService PB_oJiraServer = new JiraSoapServiceService(new URL("url"));

Btw, who is Rajesh? ;)

Narayanarao Kancharla March 13, 2013

Sorry jobin, I wrongly addressed earlier as Rajesh.

I am assigning the url in the third line. Just to remind you, this code is working fine in another instance of Jira. This is not working only on a particluar instance of jira.

I have checked and the remote api calls are enabled.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events