| Name | Jira SOAP Library |
|---|---|
| Version | 4.0 |
| Author(s) | Andy Brook |
| Price | Free |
| License | BSD |
| JavaDocs | n/a |
| IssueTracking | n/a |
| Download Source and JARs | All |
| Project SVN | here |
Description/Features
This provides provides a Maven 2 project wrapper around the JIRA SOAP library allowing quick access to SOAP without the headaches of compiling WSDL and managing dependencies of the resultant code in order to use such compiled code. It uses Apache AXIS to generate the code.
Maven 2 Configuration
This is a client library, to use, you really need to be in a maven2 environment. To use it you need to edit your pom's dependencies to include, for the desired jira support (if its been built yet):
<dependencies>
<dependency>
<groupId>com.dolby.jira.net</groupId>
<artifactId>jira-soap</artifactId>
<version>3.13.4</version>
</dependency>
</dependencies>
And enable the Atlassian repository:
<repositories>
<repository>
<id>atlassian-m2-contrib</id>
<name>Atlassian Maven 2 Contributor Repository</name>
<url>https://maven.atlassian.com/contrib</url>
</repository>
</repositories>
Eclipse users can use the example eclipse project as a starting point.
Building
To build this library use the following maven2 build targets (md5 sums have to be generated manually):
clean, axistools:wsdl2java, source:jar, install
If you happen to build the library by hand, you will see a build warning, but it can be ignored. If you see "INFO BUILD SUCCESSFUL" the build worked, examine the target/ folder.
Generating WSDL for specific Jira versions
If you dont find a build for a version of jira, generate it from your site, and attach as a versioned file, eg 'jira-3.10.wsdl'.
Examples
import com.dolby.jira.net.soap.jira.JiraSoapService;
import com.dolby.jira.net.soap.jira.JiraSoapServiceServiceLocator;
import com.dolby.jira.net.soap.jira.RemoteGroup;
import com.dolby.jira.net.soap.jira.RemoteUser;
public class ExampleClient
{
private JiraSoapServiceServiceLocator fJiraSoapServiceGetter=new JiraSoapServiceServiceLocator();
private JiraSoapService fJiraSoapService=null;
private String fToken=null;
/** Example client using the SOAP interface, extracts list of jira-users
*
* @author Andy Brook
*
*/
public static void main(String[] args) throws Exception
{
if (args.length==3)
{
ExampleClient ex=new ExampleClient(args[0],args[1],args[2]);
System.out.println("Connected ok.");
JiraSoapService soapy = ex.getJiraSOAPService();
String token=ex.getToken();
RemoteGroup remoteGroup = soapy.getGroup(token, "jira-users");
System.out.println("Invoked ok, found "+remoteGroup.getUsers().length+" users");
RemoteUser[] users = remoteGroup.getUsers();
for (RemoteUser user : users)
{
System.out.println(user.getName() +" - "+user.getEmail());
}
System.out.println("Completed.");
}
else
{
System.err.println("Usage: Example [server] [userid] [password]");
}
}
public ExampleClient(String server, String user, String pass) throws Exception //yea, in a constructor
{
try
{
String serverURL="http://"+server+"/jira";
String endPoint="/rpc/soap/jirasoapservice-v2";
fJiraSoapServiceGetter.setJirasoapserviceV2EndpointAddress(serverURL+endPoint);
fJiraSoapServiceGetter.setMaintainSession(true);
fJiraSoapService = fJiraSoapServiceGetter.getJirasoapserviceV2();
fToken = fJiraSoapService.login(user, pass);
}
catch (Exception e)
{
e.printStackTrace();
throw e;
}
}
public String getToken()
{
return fToken;
}
public JiraSoapService getJiraSOAPService()
{
return fJiraSoapService;
}
}
Version History
Versions will track the related product
Open Issues
Use this page.

Comments (41)
Nov 26, 2007
paolo says:
jira-soap-library.tar.gz seems to be corruptedjira-soap-library.tar.gz seems to be corrupted
Nov 26, 2007
Andy Brook says:
Strange, confluence is corrupting the attachments, they are fine on the way up b...Strange, confluence is corrupting the attachments, they are fine on the way up but not the way down.
Original file
after uploading, downloading
The attached project zip doesn't appear to be corrupted, try that.
Nov 27, 2007
Ivan Benko says:
Followed on https://support.atlassian.com/browse/CSP-13492 should JIRA ticket be...Followed on https://support.atlassian.com/browse/CSP-13492
should JIRA ticket be created?
Ib
May 09, 2008
jonathan doklovic says:
seems to have some dependency issues. I downloaded the zip, extracted it, and i...seems to have some dependency issues.
I downloaded the zip, extracted it, and in the jira-soap folder ran:
mvn clean (ran fine)
mvn install
first I got an error saying it couldn't resolve javamail 1.4. I added this manually and ran install again. Then got:
Missing:
----------
1) com.dolby.common:dd-common:jar:0.2.16-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.dolby.common -DartifactId=dd-common -Dversion=0.2.16-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.dolby.common -DartifactId=dd-common -Dversion=0.2.16-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.dolby.atlassian.jira:jira-soap-model:jar:0.2
2) com.dolby.common:dd-common:jar:0.2.16-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
com.dolby.atlassian.jira:jira-soap-model:jar:0.2
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
central-m2-repository (http://repo1.maven.org/maven2),
atlassian-m2-repository (http://repository.atlassian.com/maven2),
atlassian-m1-repository (https://maven.atlassian.com/maven1),
atlassian-m2-contrib (http://svn.atlassian.com/svn/public/contrib/repository/maven2),
atlassian-contrib (https://maven.atlassian.com/contrib),
atlassian-public (https://maven.atlassian.com/repository/public),
Codehaus Snapshots (http://snapshots.repository.codehaus.org)\\
Wasn't exactly sure if I should add these manually or not.
Any suggestions?
May 12, 2008
Andy Brook says:
I need to cleanup the pom, just remove the reference, its not necessary, also, m...I need to cleanup the pom, just remove the reference, its not necessary, also, mail references.
May 29, 2008
Ali Ibrahim says:
For now, just unpack the attached zip and do a 'mvn clean:install' which should ...For now, just unpack the attached zip and do a 'mvn clean:install' which should generate a jar in your local repository.
Do I need to run maven from within the jira-soap folder? If so, how would I do it from the Windows Command Prompt? I forgot the command
Maven is in this folder: C:\Program Files\apache-maven-2.0.9\bin. The Jira Soap folder is located in the bin folder.
In command line, wouldn't it be something like this:
C:\Program Files\apache-maven-2.0.9\bin\jira-soap>cd ../mvn clean:install
Noobie question, but thanks for the help in advance
May 29, 2008
Ali Ibrahim says:
Nvm, i think I figured it out. After I get the warning WARNING: Unable t...Nvm, i think I figured it out.
After I get the warning WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled, I get a build error. It says: Embedded error: WSDL2Java execution failed unknown protocol: c. I did remove three dependencies from the pom file as you suggested above, two for javax.mail and one for com.dolby.common. Did I miss something else?
May 30, 2008
Andy Brook says:
I've finally got round to deploying the library to the Atlassian hosted maven2 r...I've finally got round to deploying the library to the Atlassian hosted maven2 repo so you shouldn't need to build it which would should help. Failing that, your problems appear related to the build environment/platform.
May 30, 2008
Ali Ibrahim says:
So it should be in my repository after I download and install the Atlassian PDK?...So it should be in my repository after I download and install the Atlassian PDK? If so, what folder would it be in? If not, how can I get it in the repository?
May 30, 2008
Andy Brook says:
If you are just writing a client you don't need the PDK. To check you have ever...If you are just writing a client you don't need the PDK.
To check you have everythgin, get the Example project and build that, it will drag in what's needeed to your local maven2 repository. Windows is Documents And Settings/user/Application Data/.maven2 or similar, linux is ~/.m2/repository .
May 30, 2008
Ali Ibrahim says:
Ok I'm running the example project in Eclipse, but I don't think it's putting an...Ok I'm running the example project in Eclipse, but I don't think it's putting anything in my local maven2 repository. I built the project and get errors because it is not importing the proper files. Maybe I need to change some Eclipse settings?
May 30, 2008
Andy Brook says:
Im sure you already have, but ensure your maven2 configuration is correct for ec...Im sure you already have, but ensure your maven2 configuration is correct for eclipse, ie. you have installed http://m2eclipse.codehaus.org/ , right clicking on the project to enable dependency management should then kick in ....
May 30, 2008
Ali Ibrahim says:
Alright, my problem is that I'm really new to this and don't know how to set eve...Alright, my problem is that I'm really new to this and don't know how to set everything up...I wish I could find a reference for setting it all up. I apologize for dragging you through my problems, I just want to get this to work.
What should my settings.xml file look like in the .m2 folder?
How can I get Eclipse to run in JDK?
Is there anything else I should look out for when setting this up.
Thanks a lot for the help.
May 30, 2008
Ali Ibrahim says:
Nvm I got to work Thanks for the helpNvm I got to work
Thanks for the help
May 30, 2008
Ali Ibrahim says:
Well everything except Eclipse is running in a JRE, but a JDK is required. ...Well everything except Eclipse is running in a JRE, but a JDK is required. Also, how can I make sure my settings.xml has everything it needs?
Jun 02, 2008
Ali Ibrahim says:
I figured out all my config problems. It was mostly me be stupid... How ...I figured out all my config problems. It was mostly me be stupid...
How can I change the Maven dependencies to include more classes? I want to use the UserService class http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/index.html?com/atlassian/jira/rpc/soap/JiraSoapService.html but I don't know how I would include it in the dependencies.
Also, in your example code you used JiraSoapServiceServiceLocator to create an instance of JiraSoapService. For the api I found, JiraSoapService is an interface. How is it possible you created an instance of an interface? Can this method be applied to the other service interfaces?
Feb 17, 2009
Qasim Rasheed says:
Download link doesn't seem to work anymore? Is there a new location for this jar...Download link doesn't seem to work anymore? Is there a new location for this jar?
Thanks
Feb 17, 2009
Andy Brook says:
Looks like the JAR didn't survie the Repository reshuffle. It should be under h...Looks like the JAR didn't survie the Repository reshuffle. It should be under https://maven.atlassian.com/contrib/com/dolby/
Ill build another.
Feb 18, 2009
Qasim Rasheed says:
Andy, Thanks for posting an updated jar file. I downloaded the sample ecl...Andy,
Thanks for posting an updated jar file. I downloaded the sample eclipse project listed on this page. However whenever I run "Run As -> Maven-install" from MyEclipse (which has buit in Maven support) I keep getting this error.
1 required artifact is missing.
for artifact:
com.dolby.jira.net:jira-soap-example:jar:0.0.1
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
atlassian-m2-contrib (http://svn.atlassian.com/svn/public/contrib/repository/maven2)
Group-Id: com.dolby.jira.net
Artifact-Id: jira-soap-example
Version: 0.0.1
From file: D:\eclipse\worlspaces\java\JIRA_SOAP\pom.xml
I am a newbie on Maven so any assistance is greatly appreciated.Thanks for your hard work
Feb 19, 2009
Andy Brook says:
The eclipse project has two functions (1) to build the wsdl (2) to show its use ...The eclipse project has two functions (1) to build the wsdl (2) to show its use as an example.
To build the target jar try 'mvn axistools:wsdl2java install'. Failing that you probably need to update your maven settings.xml file. Follow instructions here to automatically download the pre-comipled jar.
Apr 24, 2009
Bob Swift says:
Andy, I see you have been updating this lately. Thanks . I got jira-soap-1.0-1...Andy, I see you have been updating this lately. Thanks
. I got jira-soap-1.0-13.3.2.jar from the link. Unfortunately it is compiled with Java 1.6. Do you intend to support 1.5? I do have 1.6 available, but only want to go there if absolutely necessary.
Apr 27, 2009
Andy Brook says:
Hi Bob, no that would be a misconfiguration on my part, I try to compile for 1.5...Hi Bob, no that would be a misconfiguration on my part, I try to compile for 1.5, though run everything here are 1.6... Done.
Apr 27, 2009
Bob Swift says:
Thanks Andy! I run 1.6 as well, but I will keep JIRA cli compiled at 1.5 for now...Thanks Andy! I run 1.6 as well, but I will keep JIRA cli compiled at 1.5 for now as well. I have a revision in the works.
May 11, 2009
Jeff Kirby says:
awesome, thank you.awesome, thank you.
Jun 16, 2009
Pascal Mengelt says:
Hi Andy I downloaded the eclipse-example.zip and all dependencies work fine. ...Hi Andy
I downloaded the eclipse-example.zip and all dependencies work fine.
When running I get the following exception:
Exception in thread "main" AxisFault faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (301)Moved Permanently faultActor: faultNode: faultDetail: {}:return code: 301 <\!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="https://jira.syseca.ch/rpc/soap/jirasoapservice-v2">here</a>.</p> </body></html> {http://xml.apache.org/axis/}HttpErrorCode:301 (301)Moved Permanently at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.dolby.jira.net.soap.jira.JirasoapserviceV2SoapBindingStub.login(JirasoapserviceV2SoapBindingStub.java:3364) at ExampleClient.<init>(ExampleClient.java:53) at ExampleClient.main(ExampleClient.java:22)Did I miss something?
When I look up the url (https://jira.syseca.ch/rpc/soap/jirasoapservice-v2) in the browser it finds the services.
Regards and thanks for help, Pascal
Jun 16, 2009
Pascal Mengelt says:
this is solved - I had to put https in the example code.this is solved - I had to put https in the example code.
Jul 07, 2009
Petr Sidorov says:
Hi Andy, thanks for a brilliant solution! Maven 2 rules! Could you hint me wher...Hi Andy,
thanks for a brilliant solution! Maven 2 rules!
Could you hint me where I should apply changes to be able to download soap stub classes from my server? I need this because I am extending JiraSoapService and want to add extra methods.
Thanks,
Petr
Jul 07, 2009
Andy Brook says:
Hi Petr, not sure I understand what you're asking for exactly. This lib, once yo...Hi Petr, not sure I understand what you're asking for exactly. This lib, once you have your dependencies set will allow you to subclass as you feel you need to.
Jul 14, 2009
David Randolph says:
Hi, Thanks for your great efforts here. They are much appreciated. This really ...Hi,
Thanks for your great efforts here. They are much appreciated. This really does make it easier to get started with JIRA client development.
I was wondering when a release of your library would be made available based on the 3.13.4-1 JIRA RPC plugin. There are a number of new methods available that I need. It seems that there is only one option for "picking your jira ver," or am I missing something?
Many thanks,
Dave
Jul 15, 2009
Andy Brook says:
The XML-RPC provides untyped responses so no client stubs are required, so no ap...The XML-RPC provides untyped responses so no client stubs are required, so no app-specific jars are required, so no, there isn't anything to generate. E.g.
Object [] projects = (Object [])rpcClient.execute("jira1.getProjectsNoSchemes", loginTokenVector);... returns an array of Map's of project attributes values.
The xmlrpc server-side plugin is bundled in WEB-INF/lib, so unless you are trying to deploy a bugfix, I doubt you need to do anything other than enable Remote API calls...
Jul 17, 2009
Bob Swift says:
Andy, my testcases for progressIssue with resolve and close issue are failing on...Andy, my testcases for progressIssue with resolve and close issue are failing on 3.13.4 (only). Says it needs the assignee field specified, but it is assigned. I suspect it is a JIRA 3.13.4 issue, but it could be an incompatible issue introduced that may be resolved by using 3.13.4 compiled version of your library. What do you think? Having a 3.13.4 version would be nice
to eliminate that possibility before I report it.
Jul 17, 2009
Andy Brook says:
Just added 3.13.4 build to maven repo, untestedJust added 3.13.4 build to maven repo, untested
Jul 17, 2009
Bob Swift says:
Andy thanks - your great! Unfortunately not so with JIRA 3.13.4 . Same problem...Andy thanks - your great! Unfortunately not so with JIRA 3.13.4
. Same problem, works fine with 3.13.3 and fails with 3.13.4 (now using your new library). Everything else is ok. I will have to write up an issue against JIRA.
Aug 03, 2009
James Brittle says:
Hi, When I try to RemoteComment.setCreated or setUpdated with a java.util.Calen...Hi,
When I try to RemoteComment.setCreated or setUpdated with a java.util.Calendar the dates don't get set to the input parameters. The dates just default to the Jira server's current date and time.
I can add comments okay, it's just the dates that can't be set.
Do you have any thoughts on what the problem might be?
Thanks,
James
Aug 03, 2009
Andy Brook says:
I think the Calendar usage is used to sort out TimeZone issues between you and t...I think the Calendar usage is used to sort out TimeZone issues between you and the server, to figure out when 'now' is in a meaningful way. How do you create your Calendar obj?
Aug 04, 2009
James Brittle says:
Below is an extract from the code Andy. I also noticed that the author isn't se...Below is an extract from the code Andy.
I also noticed that the author isn't set correctly on the comment either. It defaults to my username rather than the author I want.
Regarding the Calendar usage, I tried a fair bit playing around with it with no luck. I know that Java's Calendar can be a little confusing so I like you thought this was the problem. However as the author can't be set I am starting to conclude that the parameters are just being ignored.
final RemoteComment comment = new RemoteComment(); comment.setBody(body); comment.setAuthor(author); Calendar now = Calendar.getInstance(); now.set(Integer.valueOf(created.substring(0, 4)), Integer.valueOf(created.substring(4, 6))-1, Integer.valueOf(created.substring(6, 8)),18,23,01); comment.setCreated(now); comment.setUpdated(now); jiraSoapService.addComment(jiraToken, issueKey, comment);Aug 04, 2009
Bob Swift says:
setAuthor is depreciated and does not work on later versions of JIRA.setAuthor is depreciated and does not work on later versions of JIRA.
Aug 06, 2009
James Brittle says:
Please could someone confirm whether there is / isn't support within the SOAP AP...Please could someone confirm whether there is / isn't support within the SOAP API for adding transitions to issues / moving an issue through a workflow?
Aug 06, 2009
Andy Brook says:
From the wsdl, see this bit? window.SyntaxHighlighter.config.clipboardSwf = '...From the wsdl, see this bit?
So there will be something in there, sure of itm, haven't done workflow transitions through soap. Also, Bobs Jira CLI does it, and as it uses this, I'm guessing you will get some mileage.
Aug 07, 2009
James Brittle says:
I must have been looking under the wrong class in the API. As you said the funct...I must have been looking under the wrong class in the API. As you said the functionality is there and it operates as expected.
To give you some background on what I am doing, I am writing a 'client' to enrich issues I am migrating through the CSV importer.
I mention this as the SOAP library may be very useful for others carrying out migrations to jira.
Aug 07, 2009
Andy Brook says:
Thats fine James, my only problem with this interface is the Atlassian end is mi...Thats fine James, my only problem with this interface is the Atlassian end is missing quite a bit of functionality, so don't be surprised when a feature you need isn't there...