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

how to send/receive the contents using JIRA 4.2 Web Services?

Venkatesh Bn June 13, 2012

I am very much new to JIRA 4.2 Web Services, i want to write the method in Web Services,

such that it has to receive/send the contents i am sending from a method(issue type, status, date_created, change_date).

Please help me how to proceed.

1 answer

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 13, 2012

This is a little too vague to give you a proper answer - you're missing the basic analysis before we can help you much.

First, define what you want to do. Is it data going into Jira? Or out? Or both?

Second, think about what is going to trigger any data movement - is it Jira, or the external system?

Third, based on the answers above, decide if you need to write something to be added to your Jira, or you're going to write externally. If you tell us the two above AND tell us what the end-goal is in human terms, we can begin to guide you.

Venkatesh Bn June 13, 2012

Yes, data is going to JIRA.

I want the fileds(project Key, issue details) which i am exposing it to be added to the JIRA Project which i have created already.

i think this can be achieved by transfering the data from a standalone programme to JIRA using web-services(SOAP Client) - This is the service i am looking for.

Hope it clears the air?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 13, 2012

I'm sorry, but this is not a clear answer. You've said "I want fields I am exposing (it? eh?) to be added to the Jira project". "Exposing fields" implies you want to read them (you "expose" something to show it or publish it or make it public). Then you've said you want to add them to a project. So, do you mean read the fields OR write them? Or both? And I suspect you don't want to add fields to a project - Adding fields to a project means you want to make fields available for use in the project, which is an administration task, and usually a one-off. I think you mean you want to put data in fields in Issues within a project?

Could you clarify that?

The next bit is clear, you want to run an external program to do these things in Jira. The SOAP access to Jira 4.2 is a good way to do it - see https://confluence.atlassian.com/display/JIRA042/Remote+API+(SOAP)+Examples to get started.

Venkatesh Bn June 13, 2012

Sorry Nic, fields are already present in the project. i want to put data in fields in issues, - You are correct.

yes, i want to put my data from the standalone progamme to JIRA through web services.

I have gone through the link which you have provided and tried to set up the same in my DEV env.

I am using jira-soap-client-0.1.0-jar-with-dependencies.jar, when i ran the below command as pe r the example tutorial, i am getting the below error.

E:\venkatesh\soap>java -jar target/jira-soap-client-0.1.0-jar-with-dependencies.
jar
Error: Could not find or load main class com.crowsoftware.jira.soap

I have also tried with the below jar files and getting some error.

E:\venkatesh\soap>java -jar target/jira-soap-4.3.2.jar
no main manifest attribute, in target/jira-soap-4.3.2.jar

E:\venkatesh\soap>java -jar target/jira-soap-4.3.2-sources.jar
no main manifest attribute, in target/jira-soap-4.3.2-sources.jar

Also, what is the jar file i have to use for JIRA-4.2.

when i see the below link -

<font>https://bitbucket.org/bob_swift/jira-soap/downloads</font> which gets navigated from https://studio.plugins.atlassian.com/wiki/display/JSOAPLIB/JIRA+SOAP+Library for downloading all the jira-soap-jar files,

I am not able to see any jar files related JIRA 4.2.?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 13, 2012

Ok, take a step back - you seem to have written a chunk of code and modified it without testing the basics first. Try the simple soap client examples to begin with - if you can get them working, then you can build on them.

I'm afraid I pointed you at example code, when I should have referenced the parent page - https://confluence.atlassian.com/display/JIRA042/Creating+a+SOAP+Client - THAT contains a link to subversion to fetch a soap client - download that, run it and check that it works when pointed at your dev system. Then you can dive into more code and using other libraries.

Venkatesh Bn June 17, 2012

thanks a lot Nic.

I have created a soap client to create/update issues that have in my Local JIRA.

How can i get all the details of an issue, is it do i have to write a JQL?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 17, 2012

No. Do not mix up JQL with SQL command lines. SQL commands let you find data and return it to the user. JQL defines filters in Jira which are nothing more than a list of pointers to issues saying "these issues answer your question".

So "getting all details of an issue" isn't relevant to JQL because a JQL result is just a list of issue pointers, there's no actual data in it.

What gets you the data is code that says "get data from issue" - you need a simple bit of code (see the examples I pointed out before) that says "show data from issue X", and then you can iterate through a result set to get it all.

parthiban subramaniam
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.
June 17, 2012

Looks like you are trying to develop some sort of syncing application based on your other questions

Have a look at a few books out there in the market regarding JIRA development.

http://www.j-tricks.com/1/post/2011/11/jira-development-cookbook.html

http://shop.oreilly.com/product/0636920021087.do

they are worth it and a good investment and will save you time in long term.

TAGS
AUG Leaders

Atlassian Community Events