Bug 127016 - Add an Axis emitter preference page
Summary: Add an Axis emitter preference page
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.5 M6   Edit
Assignee: andy zhai CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation
Depends on:
Blocks:
 
Reported: 2006-02-08 21:47 EST by Chris Brealey CLA
Modified: 2006-05-29 20:44 EDT (History)
1 user (show)

See Also:


Attachments
patch fix to org.eclipse.jst.ws.axis.consumption.core (12.21 KB, patch)
2006-03-21 20:49 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.ui (11.10 KB, patch)
2006-03-21 20:51 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.core (21.17 KB, patch)
2006-03-23 13:06 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.ui (19.21 KB, patch)
2006-03-23 13:09 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.core (22.24 KB, patch)
2006-03-27 07:33 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.ui (20.05 KB, patch)
2006-03-27 07:34 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.ui (20.05 KB, patch)
2006-03-27 12:15 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.ui (20.20 KB, patch)
2006-03-27 12:30 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.ui (20.21 KB, patch)
2006-03-28 11:37 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.core (24.01 KB, patch)
2006-03-29 20:48 EST, andy zhai CLA
no flags Details | Diff
patch fix to org.eclipse.jst.ws.axis.consumption.ui (21.68 KB, patch)
2006-03-29 20:49 EST, andy zhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Brealey CLA 2006-02-08 21:47:00 EST
RFE bug 88684 is open to support plugging in multiple versions of Axis and includes the provision of a preference page to adjust the properties of the emitters. It may be some time before this RFE gets implemented, and bug 87296 has shown that some preferences (the emitter timeout, in this case) should not have to wait.

For the sake of usability, we should define a simple preference page to control properties of the Axis emitters, starting with the timeout. I'd like to consider this for WTP 1.5.

Preferences to consider for WSDL2Java:

-v, --verbose
        print informational messages
-O, --timeout <argument>
        timeout in seconds (default is 45, specify -1 to disable)
-D, --Debug
        print debug information
-q, --quiet
        do not print any informational or debug messages (except errors)
-d, --deployScope <argument>
        add scope to deploy.wsdd: "Application", "Request", "Session"
-a, --all
        generate code for all elements, even unreferenced ones
-H, --helperGen
        emits separate Helper classes for meta data
-w, --wrapArrays
        Prefers building beans to straight arrays for wrapped XML array types (defaults to off).

Preferences to consider for Java2WSDL:

-a, --all
        look for allowed methods in inherited class
Comment 1 Chris Brealey CLA 2006-03-15 17:37:00 EST
Andy, thanks for running with this. I'll post more details to this RFE.
Comment 2 Chris Brealey CLA 2006-03-17 16:26:42 EST
Andy, a few comments about this work.

1. The new preference page should live in org.eclipse.jst.ws.axis.consumption.ui. A couple of the properties are only really applicable to service creation, but for now, I don't want to incur the cost of a second page simply to separate a couple creation-only preferences from the rest of the pack.

2. The actual preferences themselves must be managed in org.eclipse.jst.ws.axis.consumption.core (ie. NOT in a UI plugin).

3. Not all the properties in the opening remarks may be useful, specifically the "verbose", "debug" and "quiet" options. We do not route the output from the Axis emitters to the Eclipse console view, so there isn't much direct benefit to the user of including these options on the page. Let's skip them for now.

4. Rather than write a preference page from scratch, I recommend you copy and tweak one of our existing pages: "ResourceManagementPreferencePage".

5. You will find that ResourceManagementPreferencePage manages its preference via an interface named "ResourceContext" returned by the "getResourceContext" method on class "WebServicePlugin". This will quickly lead you to another class named "PersistentResourceContext". Notice that all this is core stuff, meaning the only code that should be the axis.consumption.ui plugin should be the preference page. You should mimic / copy this "ResourceContext" pattern in the implementation of this RFE.

6. You will need to write some logic in WSDL2JavaCommand and Java2WSDLCommand to get properties from your equivalent to "ResourceContext" and set them on the Axis emitter object.

7. Because we have already invented a JRE property for the "timeout" option, you'll have to treat that one a bit specially compared to the other totally new new options. In particular, if the JRE property is set, we must give priority to its value over the preference value in WSDL2JavaCommand. Secondly, if the JRE property is set and the user opens the preference page, we should set the timeout field to the value of the JRE property, disable the field, and explain to the user why the field is disabled (because they're using the JRE property).

That's all for now.
Comment 3 andy zhai CLA 2006-03-21 20:49:36 EST
Created attachment 36710 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.core

This patch only contains 3 checkbox preferences, and wsdl2java and java2wsdl have not been updated yet.
Comment 4 andy zhai CLA 2006-03-21 20:51:33 EST
Created attachment 36711 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.ui

This patch only contains 3 checkbox preferences: 
-a All
-h helpGen
-W wrapArrays
Comment 5 andy zhai CLA 2006-03-23 13:06:33 EST
Created attachment 36824 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.core

all options included (except for -debug, -verbose and -silent)
logic in wsdl2java and java2wsdl has been added
special process is added for special case: time out 
so it's probably done for this plugin
Comment 6 andy zhai CLA 2006-03-23 13:09:53 EST
Created attachment 36825 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.ui

functionality is done. left thing to do is to make the preference page more beautiful or prefessinal
Comment 7 andy zhai CLA 2006-03-27 07:33:40 EST
Created attachment 36985 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.core

final version
Comment 8 andy zhai CLA 2006-03-27 07:34:34 EST
Created attachment 36986 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.ui

final version
Comment 9 andy zhai CLA 2006-03-27 12:15:40 EST
Created attachment 37001 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.ui

final version
Comment 10 andy zhai CLA 2006-03-27 12:30:54 EST
Created attachment 37003 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.ui

A little bit of change
Comment 11 andy zhai CLA 2006-03-28 11:37:13 EST
Created attachment 37097 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.ui

add around for seconds = Math.ceil(millseconds/1000.0) Now 100, 2200 millseconds will be displayed with 1 second and 3 seconds.
Comment 12 andy zhai CLA 2006-03-29 20:48:50 EST
Created attachment 37262 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.core
Comment 13 andy zhai CLA 2006-03-29 20:49:54 EST
Created attachment 37263 [details]
patch fix to org.eclipse.jst.ws.axis.consumption.ui
Comment 14 andy zhai CLA 2006-03-29 20:56:47 EST
Kathy,
I have updated what you mentioned this afternoon ( copyright head, comment of head, timeout=-3..., load default for timeout with property...). execpt the log file information statement for scope option because the statment need different information for each type of scope.
Comment 15 Kathy Chan CLA 2006-03-30 02:17:22 EST
Patches reviewed, committed and released to WTP 1.5 as v200603300448.
Comment 16 Chris Brealey CLA 2006-05-29 20:44:06 EDT
Verified in RC2.
Comment 17 Chris Brealey CLA 2006-05-29 20:44:23 EDT
Closed