Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 102938 - Web Service Generate Client Command Overwrites Files Without Warning
Summary: Web Service Generate Client Command Overwrites Files Without Warning
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 0.7   Edit
Hardware: PC Windows XP
: P4 major (vote)
Target Milestone: 1.0 M10   Edit
Assignee: Kathy Chan CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-06 16:43 EDT by Arthur Ryman CLA
Modified: 2006-02-17 13:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Ryman CLA 2005-07-06 16:43:34 EDT
Found in M5.
1. Create a Web module, Web1, in project Project1.
2. Create a Java class, e.g. org.example.Hello
3. Select Hello class, and execute the comment Web Services -> Create Web
Service (just deploy it).
4. Select the generated WSDL, Hello.wsdl, and execute the command Web Services
-> Generate Client. Generate code to Web1 and DO NOT check the "Overwrite files
without warning" check box.
5. The wizard overwrites the original Hello class with the client proxy.
Comment 1 Chris Brealey CLA 2005-07-07 13:17:35 EDT
Assigning to Chris for his review.
Comment 2 Chris Brealey CLA 2005-07-12 13:50:06 EDT
There are two problems, fixes for neither of which can be contained safely in 
WTP 0.7.

1. First, overwrite is not respected by the Axis emitter. The cheesy 
explanation is that the Axis emitter runs in its own JRE and is not beholden to 
our Eclipsey overwrite preference. I have a solution in mind for this as part 
of another, largely unrelated enhancement intended for WTP 1.0.

2. Second, even if overwrite did its job, there is no warning to the user that 
the files generated for a Web service client will usually collide with the 
files that already exist for a generated Web service, and that for runtimes 
like Axis and WebSphere the two simply cannot coexist peacefully in the same 
project. We have the means to check for and warn users against the generation 
of clients into the same projects hosting their services, but have some work to 
do to adapt it for use with Axis-deployed services and clients.

For WTP 0.7, we will make do with a warning in New & Noteworthy (unless there 
is a more appropriate place to list limitations).
Comment 3 Chris Brealey CLA 2005-09-22 14:04:37 EDT
As fixes go, this is larger than the average bear. Retargetting to M10.
Comment 4 Kathy Chan CLA 2005-11-30 00:55:20 EST
This fix part 1 of the problem (overwrite not observed) by using a tempoary directory in the plugin's state location for the Axis emitter and copying to the actual location after the emitter is called.

Changes have been committed and released as v20051130_1254.
Comment 5 Chris Brealey CLA 2005-11-30 08:51:06 EST
Kathy, thanks very much. I've opened bug 118623 for the second issue described in comment 2. PS: I think your tag should have been v20051130_0054 instead of v20051130_1254 - and a good reason NOT to be working on bugs so late!
Comment 6 Arthur Ryman CLA 2005-12-22 15:38:45 EST
In RC5, I got a nice error message that prevented the overwrite:

IWAB0164E Cannot create the file "Hello.java" relative to the path "/test2/src/org/demo" because automatic file overwriting has not been enabled. Do you want to enable it for this file?

Verifying.
Comment 7 Kathy Chan CLA 2006-02-17 13:17:12 EST
Closing.