Bug 168938 - Axis2: Support the export of AAR
Summary: Axis2: Support the export of AAR
Status: NEW
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Saminda Wijeratne CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard: Axis2
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-12-22 10:47 EST by Kathy Chan CLA
Modified: 2010-06-10 13:44 EDT (History)
2 users (show)

See Also:


Attachments
patch for 168938 (28.48 KB, patch)
2009-01-03 02:00 EST, Saminda Wijeratne CLA
no flags Details | Diff
patch for 168938 (28.69 KB, patch)
2009-01-09 09:11 EST, Saminda Wijeratne CLA
no flags Details | Diff
patch for 168938 (27.78 KB, patch)
2009-03-05 05:48 EST, Saminda Wijeratne CLA
no flags Details | Diff
icons for the patch for 168938 (1.17 KB, patch)
2009-03-05 05:53 EST, Saminda Wijeratne CLA
no flags Details | Diff
patch for 168938 (26.68 KB, patch)
2010-03-17 04:16 EDT, Saminda Wijeratne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Chan CLA 2006-12-22 10:47:28 EST
As part of Axis2 integration into WTP, we need to support the export of Axis service archive (AAR) from the workspace to the file system.  

The user should be able to:

- select a project containing the AAR in exploded form in the workspace to be exported.
- use a Browse button to browse for a destination to export the AAR to.

This is a subordinate RFE to the main Axis2 integration bug 165664.
Comment 1 Kathy Chan CLA 2007-03-14 11:07:11 EDT
Could not make it into WTP 2.0 M6.  Deferred out of WTP 2.0.
Comment 2 Kathy Chan CLA 2007-07-24 17:29:09 EDT
Targetting WTP 3.0.
Comment 3 Kathy Chan CLA 2008-04-10 14:26:29 EDT
Setting target field to future since all WTP 3.0 RFEs needs to be in by M6 which had already been declared.  Please put a more accurate target when these RFEs are in plan for a particular release.
Comment 4 Saminda Wijeratne CLA 2008-12-30 00:48:35 EST
Hi,

Few questions. What is meant by the AAR in exploded manner in the project? Does it mean a web service created in WebContent/WEB-INF/services folder? or does it mean to use the compiled code of the source of the project and the services.xml is present inside a MANIFEST folder??
Comment 5 Saminda Wijeratne CLA 2008-12-30 01:21:56 EST
also if it is the first case, then there might be more than one axis2 service present in the services folder. In which case user should be presented with the services present and let him/her select which service to export.
Comment 6 Saminda Wijeratne CLA 2009-01-03 02:00:53 EST
Created attachment 121455 [details]
patch for 168938

I went along with my first assumption which is webservices in the webcontent folder. I didn't yet add an icon to it. Should we create the icon or will u be providing an icons. Is there a specification which we should follow if we are to create an icon? I was thinking of assigning an icon to aar file resources shown in the workspace in eclipse too.
Comment 7 Saminda Wijeratne CLA 2009-01-03 02:10:46 EST
Hi Kathy,

Can you check whether the above patch does what you are expecting from this RFE? I didn't exactly know to which project i should include the changes. I added then to the creation.ui project. If you have any suggestions regarding this please put forward.

also i couldn't find the category id for the "Web Services" category in the export dialog. So for nw the aar export will appear in the "Other" category. Can you tell me from where i could find the id for it?

Thanx
Saminda
Comment 8 Saminda Wijeratne CLA 2009-01-03 02:12:00 EST
also slightly deviated from the usecase in http://wiki.eclipse.org/Use_cases_for_Axis2_Integration_in_WTP#Export_an_AAR by allowing the user to select the webservice to export (not only selecting the project)
Comment 9 Kathy Chan CLA 2009-01-08 20:13:02 EST
Hi Saminda,

I grabbed the patch and tried to run it on the 01/08 WTP 3.1 driver and tried to test it.  I create a bottom-up Axis2 Web service on Echo.java and deploy it on a server.  What I mean by AAR in exploded format is:

   WebContent
   - WEB-INF
     - services
       - Echo
  
When I go to the Export wizard, I can see the AAR file under the Others.  However, when I tried to click on it, nothing happened.  When I tried to set a NPE breakpoint, I see that it has an NPE when trying to get the WEB-INF directory of the "Servers" project.  This is the stack trace:

Exception NullPointerException))	
	J2EEUtils.getWebInfPath(IProject) line: 1264	
	Axis2CoreUtils.getWorkspaceWebProjectList() line: 261	
	AARExportWizardPage.fillProjectSelectionCombo() line: 167	
	AARExportWizardPage.createControl(Composite) line: 100	
	WizardDialog.updateForPage(IWizardPage) line: 1147	

If I delete the Servers directory, clicking Next in Export -> Others -> AAR file still seems to hit some other exception and did not move to the AAR export page where I am supposed to be able to choose the project and the Web service within the project to export to AAR.

Please take a look at the code and see what could be the problem.

As for the export category, the Web servies category id is:

org.eclipse.jst.ws.creation.ui.wsexport.category

It's defined in org.eclipse.jst.ws.creation.ui

It would be a good idea to have an icon for AAR files in the workspace and for the export wizard.  Please note that the icon has to be original artwork from you.  If it is created by someone in your organization or copied from another product, then we need to make sure you have the right to contribute it to Eclipse.




Comment 10 Saminda Wijeratne CLA 2009-01-09 01:32:21 EST
Hi Kathy,

yeah the NPE is expected in this case. I forgot to mention here that i dont know hw to determine whether a given project is a web project or not. So what I did is to tried to get the web-inf folder and if it is success then its a web project, else its not a web project. I had this prob in creating a patch for the Bug 249922. In there i checked the existence of a set of project natures in the given project. Can you suggest me a clean way to this using eclipse?

Anyway the NPE thrown as shown in the stack was expected for non-web project as explained above. So the problem may have been in some place else or I may have missed some files in the patch. I'll check the patch with a new cvs checkout and see what is wrong.

So am I to take that the code for this RFE is ok to be in "....creation.ui" project?

I'll try to give a shot at creating an icon. Not much of a artwork guy. I'll put forward some samples later to this RFE.
Comment 11 Saminda Wijeratne CLA 2009-01-09 09:11:46 EST
Created attachment 122112 [details]
patch for 168938

The earlier patch did not work on windows, I'm not exactly sure why it happens, but it was due to the differences in the behaviors of the events in UI controls. Anyway fixed the issue in this patch and tested it in both windows and linux. Is there a way to debug the plugin running in a remote machine? It took me a while to figure out the problem bcos i didn't have the environment set in the windows machine.

It will take me a long time to create an icon, So i'll get someone here to create an icon. What is the procedure I should follow to get his approval to legally contribute it to the eclipse?
Comment 12 Kathy Chan CLA 2009-01-16 14:59:45 EST
I tried the new patch and it seems to work OK on Windows.  I was able to select different AAR to be exported when there are more than 1 Axis2 Web service in a project.

As for the icon, please follow the Eclipse legal process as documented in:

http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf

Comment 13 Saminda Wijeratne CLA 2009-03-05 05:48:25 EST
Created attachment 127634 [details]
patch for 168938

This patch contains the updated code for the export functionality including the code for specifying the icon.
Comment 14 Saminda Wijeratne CLA 2009-03-05 05:53:51 EST
Created attachment 127636 [details]
icons for the patch for 168938

This icon is created in WSO2 for the purpose of representing axis2 archives. I got the OK for using this icon in eclipse from Samisa. Therefore we are herewith giving permission to use this icon to eclipse wtp axis2 project under the eclipse license.
Comment 15 Saminda Wijeratne CLA 2009-03-05 05:55:01 EST
almost forgot, just extract the icons.zip file to the org.eclipse.jst.ws.axis2.creation.ui project folder.

Comment 16 Keith Chong CLA 2009-03-17 15:53:42 EDT
Deferring to 3.1 M7.
Comment 17 Keith Chong CLA 2009-04-30 12:55:32 EDT
Let's revisit this, along with companion bug 168937, for 3.2.
Comment 18 Keith Chong CLA 2010-03-04 14:01:50 EST
Designating this as helpwanted, as per comment in bug 168937,
Comment 19 Saminda Wijeratne CLA 2010-03-17 04:16:03 EDT
Created attachment 162243 [details]
patch for 168938

Fixed the NPE issue and the blank page when clicked back button issue. This patch shares code with bug 168937.

Please verify and commit.

Saminda