Bug 165389 - provide web service wrapper to JIRA
Summary: provide web service wrapper to JIRA
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P1 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Brock Janiczak CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 159313 168149 169102 170718
  Show dependency tree
 
Reported: 2006-11-21 18:24 EST by Mik Kersten CLA
Modified: 2007-04-04 04:18 EDT (History)
5 users (show)

See Also:


Attachments
Jira core plugin (148.86 KB, application/octet-stream)
2006-12-06 05:35 EST, Brock Janiczak CLA
no flags Details
updated contribution (143.87 KB, application/octet-stream)
2007-01-29 15:22 EST, Mik Kersten CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2006-11-21 18:24:06 EST
We currently rely on JIRA Core Services from tigris.org, but would benefit from maintaining our own wrapper so that we could fix and evolve it.  We would provide this wrapper as a headless Java API to JIRA as we do with Bugzilla.
Comment 1 Brock Janiczak CLA 2006-12-06 05:35:18 EST
Created attachment 55113 [details]
Jira core plugin

Attached is the source for 0.9.3 of the Jira Dashboard core services plugin that has been refactored for inclusion in eclipse as a bundle.

This plugin contains no third party libraries.  References to libraries will have to be replaced with require bundle directives.  We will need to ensure that the Axis bundle from orbit has an optional require-bundle on commons HTTPClient (my guess is that it won't).
Comment 2 Eugene Kuleshov CLA 2006-12-06 20:22:10 EST
We may need to regenerate soap stubs to match Mylar packages. Probably something like this:

set cp=axis.jar
set cp=%cp%;commons-logging-1.0.4.jar
set cp=%cp%;commons-discovery-0.2.jar
set cp=%cp%;commons-codec-1.3.jar
set cp=%cp%;jaxrpc.jar
set cp=%cp%;saaj.jar
set cp=%cp%;wsdl4j-1.5.1.jar

set opts=-v
set opts=%opts% --NStoPkg http://beans.soap.rpc.jira.atlassian.com=org.eclipse.mylar.jira.beans
set opts=%opts% --NStoPkg http://exception.rpc.jira.atlassian.com=org.eclipse.mylar.jira.exceptions
set opts=%opts% --NStoPkg http://jira.atlassian.com/rpc/soap/jirasoapservice-v2=org.eclipse.mylar.jira.service

java -cp %cp% org.apache.axis.wsdl.WSDL2Java %opts% http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl

Though I am not sure where to get wsdl for the minimally required version. One available at above url has little more stuff in it comparing to stubs Brock generated half a year ago.
Comment 3 Mik Kersten CLA 2006-12-06 20:35:14 EST
Great to see this Brock!  I will review this early next week, once we get 1.0 out.  
Comment 4 Mik Kersten CLA 2006-12-20 19:33:17 EST
Still waiting on IP approval.
Comment 5 Mik Kersten CLA 2007-01-19 14:04:53 EST
On Monday this week I inquired on the IPZilla report about status, still waiting for reply.
Comment 6 Mik Kersten CLA 2007-01-19 17:28:26 EST
IPZilla status changed to "triage", which is good.
Comment 7 Mik Kersten CLA 2007-01-29 15:21:16 EST
Submission is approved!  Finally.

Eugene: I assume you're still willing to take a pass at integrating the patch?  Please make sure to use the version of the Zip that I'm about to attach, because it excludes the two non-EPL files that did not get approved.
- EasySSLProtocolSocketFactory.Java
- EasyX509TrustManager.Java
Comment 8 Mik Kersten CLA 2007-01-29 15:22:16 EST
Created attachment 57731 [details]
updated contribution
Comment 9 Eugene Kuleshov CLA 2007-01-29 15:25:47 EST
(In reply to comment #7)
> Submission is approved!  Finally.
> Eugene: I assume you're still willing to take a pass at integrating the patch? 

Sure. Did that commit access request for the new project went trough? I haven't seen response from the webmaster...

Should I regenerate the wsdl stubs for org.eclipse.mylar packages?
Comment 10 Mik Kersten CLA 2007-01-29 21:54:58 EST
Excellent.  You should have permission now.  It's up to you if you want to re-generate the WSDL, since we have permission to use it.  However, we should not have com.atlassian packages in our repository.  How about the following package name:  org.eclipse.mylar.jira.core.wsdl..  ?
Comment 11 Eugene Kuleshov CLA 2007-01-30 00:38:35 EST
I just realized that we'll need Axis 1.4 1855 April 22 2006 - axis.jar

Which also require the following jars:
commons-discovery-0.2.jar
jaxrpc.jar
saaj.jar
wsdl4j-1.5.1.jar

these 4 jars are part of WTP's Axis plugin, but WTP's Axis is 1.3 2244 October 5 2005.

What are we going to do about that?
Comment 12 Gunnar Wagenknecht CLA 2007-01-30 06:32:25 EST
Mhm. Something like Axis should probably go into the Orbit.
Comment 13 Eugene Kuleshov CLA 2007-01-30 12:29:15 EST
(In reply to comment #12)
> Mhm. Something like Axis should probably go into the Orbit.

It might, but doesn't necessary have to. Besides, at this point Orbit is still another hassle for us.
Comment 14 Mik Kersten CLA 2007-01-30 22:32:55 EST
Gunnar: Yes, it would be nice to have Axis in Orbit so I created bug 172264.  Let's not hold this up on that though, because we need to get this in asap.  Also, our first orbit priority is httpclient, bug 167362). 

Eugene: you can commit the following libraries into org.eclipse.mylar.jira.core/lib
* axis: 1.3
* commons-discovery: 0.2
* jaxrpc: 1.1
* saaj.jar: 1.1, 1.2, or 1.3
* wsdl4j: 1.4, 1.5.2
Comment 15 Eugene Kuleshov CLA 2007-01-30 22:56:25 EST
Mik, what version should I use for org.eclipse.mylar.jira.core plugin?
Comment 16 Eugene Kuleshov CLA 2007-01-31 00:49:31 EST
Ok. I committed quite huge chunk of changes:

-- Brock's code renamed to org.eclipse.mylar.jira.core.internal packages (as per Mik's advise)
-- regenerated wsdl stubs into org.eclipse.mylar.jira.core.internal.soap and org.eclipse.mylar.jira.core.internal.beans packages
-- axis and the required jars

Here is the command I used to generate stugs from Jira wsdl:

set cp=lib/axis-1.3.jar
set cp=%cp%;lib/commons-discovery-0.2.jar
set cp=%cp%;lib/jaxrpc.jar
set cp=%cp%;lib/saaj.jar
set cp=%cp%;lib/wsdl4j-1.5.1.jar

set cp=%cp%;../org.eclipse.mylar.context.core/lib/commons-codec-1.3.jar
set cp=%cp%;../org.eclipse.mylar.context.core/lib/commons-logging.jar
set cp=%cp%;../org.eclipse.mylar.context.core/lib/commons-logging-api.jar

set opts=-v
set opts=%opts% --NStoPkg http://beans.soap.rpc.jira.atlassian.com=org.eclipse.mylar.jira.core.internal.beans
set opts=%opts% --NStoPkg http://exception.rpc.jira.atlassian.com=org.eclipse.mylar.jira.core.internal.soap
set opts=%opts% --NStoPkg http://jira.atlassian.com/rpc/soap/jirasoapservice-v2=org.eclipse.mylar.jira.core.internal.soap

java -cp %cp% org.apache.axis.wsdl.WSDL2Java %opts% http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl

I only did very minor smoke testing, but server validation, query configuration and synchronization, as well as JIRA editors are working. 

Please check this code. Note that if you had org.tigris.jira.core and org.tigris.jira.core.soap plugins you can remove them now.
Comment 17 Mik Kersten CLA 2007-01-31 21:48:52 EST
Eugene: please don't touch the jira.core code until I post here again, donig some major clean-up...
Comment 18 Mik Kersten CLA 2007-01-31 22:25:06 EST
I've done the following:
* Enforced the eclipse.org convention and changed the packages to org.eclipse.mylar.internal.jira.core..
* Moved the Axis generated files to the ..jira.core.wsdl.beans and .soap packages.  I want to make it clear that these are generated, don't have EPL headers, etc.
* Suppressed the various warnings that come from the generated files via @SuppressWarnings({ "unchecked", "serial", "unused" }).  I did this manually so not all have the same suppressions.  However, if we re-generate it would be easier to add that string to each class declaration.
* Generified all non-type safe references.
* Fixed the EPL header on every file.
* Added an @author Brock Janiczak tag to all of the files (most didn't have it).  

In other words, the hundreds of warnings are now gone so we adhere to our "no warnings" convention.  AllJiraTests pass but this needs more testing as indicated.

Eugene: let's go for a dev build tomorrow?  I'll also bootstrap onto it.
Comment 19 Eugene Kuleshov CLA 2007-01-31 22:45:16 EST
Dev build would be a good idea. I won't be able to do much work on this before weekend.
Comment 20 Mik Kersten CLA 2007-02-01 18:28:03 EST
Reassigning to Brock, whom we have to thank for this contribution.
Comment 21 Mik Kersten CLA 2007-02-01 19:18:35 EST
The integration is done, and I'm sending a message to mylar-dev describing the effects of this change.