Bug 236523 - Overwrite setting on Web service wizard is coupled with preference
Summary: Overwrite setting on Web service wizard is coupled with preference
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: Andrew Mak CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard:
Keywords: contributed
: 225369 235932 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-10 17:55 EDT by Andrew Mak CLA
Modified: 2008-08-01 02:24 EDT (History)
2 users (show)

See Also:


Attachments
prototype fix (23.07 KB, patch)
2008-06-10 18:08 EDT, Andrew Mak CLA
no flags Details | Diff
patch (22.30 KB, patch)
2008-06-16 15:47 EDT, Andrew Mak CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mak CLA 2008-06-10 17:55:01 EDT
Opening this bug to track an issue discovered from bug 235932.  In that bug, a fix was made so that the Web service wizard will respect the "Overwrite files without warning" setting on the first page of the wizard.  However, making the fix exposes a deeper problem which is the setting on the wizard actually changes the global preference setting.

This problem is found late in 3.0 cycle and a proper fix to decouple the logic not only requires change in the core framework, but we also need to coordinate with adopters because there's code that reads the setting directly from preferences.

Hopefully we can tackle this fix post 3.0.
Comment 1 Andrew Mak CLA 2008-06-10 18:08:19 EDT
Created attachment 104400 [details]
prototype fix

*This patch is only a prototype*

This patch shows how we can pass-around a copy of the preference settings to be used during the wizard flow.  However, in order for the fix to work we also need to make sure all adopter code retrieves the setting from the command framework's enviroment rather than going to the preference directly.  This fix ONLY includes the changes necessary to make Axis scenario work.
Comment 2 Kathy Chan CLA 2008-06-11 15:06:01 EDT
*** Bug 225369 has been marked as a duplicate of this bug. ***
Comment 3 Kenneth Evans, Jr. CLA 2008-06-11 17:12:57 EDT
Continuing from #235942

>> Let's continue future discussions regarding this issue in bug 236523.

>> I agree with you completely that the preference setting should not be touched
during the wizard flow.

>> ... we also need to ensure we do not break adopter's code, etc.

I understand.  I think we're in agreement.  Thanks,

     -Ken
Comment 4 Kenneth Evans, Jr. CLA 2008-06-11 17:16:43 EDT
Sorry, that should have said from Bug #235932.
Comment 5 Andrew Mak CLA 2008-06-16 15:47:38 EDT
Created attachment 105068 [details]
patch

This patch has minor differences with prototype fix.
Comment 6 Kathy Chan CLA 2008-06-18 21:26:59 EDT
Patch committed and released to WTP 3.0.1 as v200806181924.

The only change that's not committed is the change to JavaMerger.  We need to discuss what's the best way to handle that.  Once we desided on that, we'll open a defect to address that specific problem.
Comment 7 Kathy Chan CLA 2008-06-18 21:31:20 EDT
*** Bug 235932 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Mak CLA 2008-06-19 11:18:52 EDT
Note on the JavaMerger:

In JavaMerger I'm purposely forcing overwrite to true using a TransientResourceContext.  The reason is because when the axis emitter generates the skeleton file, it is first generated to a temp location and copied back to the workspace.  So at this point there would already be a prompt to overwrite the file, and the skeleton merge code will run only if the user answers yes for the prompt.

Secondly, skeleton merge is controlled by a separate preference option.  Therefore, if the users answers yes to overwrite and skeleton merge option is enabled, it would be redundant to prompt the user again.

I've discuss this with Kathy and agree that this is the correct behaviour.
Comment 9 Kathy Chan CLA 2008-06-19 11:29:24 EDT
Thanks for the clarification, Andrew!

I've committed Andrew's original patch for JavaMerger.  I've released it to WTP 3.0.1 as v200806191512.
Comment 10 Andrew Mak CLA 2008-06-20 11:44:19 EDT
Verified, closing.