Community
Participate
Working Groups
Build ID: R-3.0-20080616152118 Steps To Reproduce: 1. Create a Dynamic Web Project (new workspace) with an e.g. Echo Java Bean, targeting e.g. Tomcat 55, and server targets e.g. JRE 1.5 2. Create a web service from the bean 3. Now change the Java Version of the facet to 6.0 (need to deselect the targeted runtime for first in order to increase version) 4. Creating client in the same project results in validation error on first page of wizard: "The Tomcat 5.5 server does not support the Client project" 5. Now Hide All Popup Dialogs for WS's (Preferences > Web Services > Pop up Dialog Selection) 6. Now again create the client, it is created without error into the dynamic web project but cannot run/deploy as the class files are compiled with JRE 6.0 yet server only has JRE 1.5. More information:
Eric, I suspect this is a problem since WTP 1.5. I think all validation is bypassed, not just this check. Could you please verify? Thanks! Tentatively targetting WTP 3.1 for now.
Assume all the validation is turned off, creating a web service client from bad wsdl gives exception dialog instead of nice validation error when the wizard is used: IWAB0399E Error in generating Java from WSDL: org.xml.sax.SAXException: Fatal Error: URI=file:/D:/WTP/R-3.0-20080616152118/runtime-New_configuration_0717_2/WP/WebContent/wsdl/Echo.wsdl Line=6: Attribute name "elemen" associated with an element type "schema" must be followed by the ' = ' character.
Eric, please look into what it takes to fix this and see if it could be contained in WTP 3.0.1. Supporting creation of bottom-up Web service from Java bean in Java project does open up the situation of the user getting a validation error in the banner when going to the first page. In the other cases, typically the user would only get an error after they've made some changes on the page.
While working on fix I see that assumptions and statements in previous notes are incorrect: there IS validation taking place when the wizard does not appear, just not for the 2 cases in the defect.
Created attachment 108395 [details] Patch for validation part of this defect.
*** Bug 241965 has been marked as a duplicate of this bug. ***
This fix will also address Bug 241965- Exception in Web Service wizard if no server runtimes defined
Also changes validation error message for BUJ from Bean in Java project for ANT & hidden wizard, when service type requires a runtime & no server runtimes exist & the service project does not exist... WAS: No suitable server can be found for the Apache Axis Web service runtime. Go to Window > Preferences. Select Server > Runtime Environments and configure a server runtime. Should be (to match error in WS wizard): No server can be found and WebServiceProject does not exist. Choose an existing project or use the preferences to configure a server runtime.
Created attachment 108660 [details] patch obsoletes previous patch
If this problem is not fixed: 1. A bottom-up Java Bean web service created from a bean existing in a Java project can be created but will not work at runtime (due to class version error/exception) 2. A Web Service client created in a Java Project cannot be deployed/started as the Java Project facet versions are not supported by the targeted server 3. A Web Service created from a wsdl with validation errors will results in an ugly exception dialog & stack-trace (or console error if created using ANT), instead of a nice dialog indicating the WSDL is invalid 4. If there are no server runtimes defined (which is the default in WTP), then creating a web service or web service client will result in exceptions dialog/message and the ws or ws client cannot be created. 5. There will be misleading error messages indicating when creating web services or web service clients indicating that a server needs to exist for this task, when in fact the requirement is that one or both of the following need to exist: the project, the server. The fixes code involved for the problem above is either trivial, or re-uses pre-existing code for the most part- there is not much new here. The fixes have been unit-tested thoroughly as per the unit-test notes below. Unit testing for validation of projects & exceptions realted to no server defined included: BUJava in Java Project Service Project exists Java Project Facets matches WS wizard no server rts defined stubs only rts defined ANT little testing- opened 242312 Hide WS wizard rt defined, server not created no server rts defined Java Project Facets do not match WS wizard server exists no server rts defined stubs only rts defined rt defined, server not created ANT little testing- opened 242312 Hide WS wizard rt defined, server not created Service Project does not exist Java Project Facets matches WS wizard no server rts defined stubs only rts defined rt defined, server not created ANT little testing- opened 242312 Hide WS wizard rt defined, server not created no server rts defined stubs only rts defined Java Project Facets do not match WS wizard server exists ANT little testing- opened 242312 Hide WS wizard stubs only rts defined WS Client in Java Project Java Project exists Java Project Facets matches WS wizard no server rts defined stubs only rts defined rt defined, server not created ANT stubs only rts defined Hide WS wizard rt defined, server not created stubs only rts defined no server rts defined Java Project Facets do not match WS wizard stubs only rts defined rt defined, server not created ANT stubs only rts defined Hide WS wizard stubs only rts defined rt defined, server not created Java Project does not exist Java Project Facets matches WS wizard no server rts defined server exists rt defined, server not created ANT no server rts defined server exists stubs only rts defined Hide WS wizard rt defined, server not created no server rts defined stubs only rts defined
Comment on attachment 108395 [details] Patch for validation part of this defect. Eric's patch includes the patch from Peter.
Patch reviewed. Requesting PMC approval for WTP 3.0.1.
Sounds a bit like a corner case, or several corner cases, but imagine it's the least experienced users that would hit these issues, so should increase usability. thanks.
The changes for this defect have been committed and released to the HEAD and V301 stream under v200807301838.
This defect has been in resolve state for a while. Please verify this with the appropriate WTP driver which can be found in: http://download.eclipse.org/webtools/downloads/ We would verify and close the defect on the originator's behalf if it has not been verified 2 weeks after it's been changed to Verified state.
verified in M-3.0.3-20080925125100