Community
Participate
Working Groups
1. Create a new Java project in default workspace. 2. Create a simple Java class 3. Right click on the class and attempt to generate Web Service. Select invokeSomeService(...) as the ONLY target method and RPC encoding. Error dialog: "Error in generating WSDL from Java java.lang.ClassNotFoundException: foo.TestCase" I am on wtp-1.0 all-in-one (wtp 1.0/eclipse 3.1.1) with JDK 1.4.2_06 and Tomcat 5.0.30 as my target runtime.
Created attachment 34365 [details] Exported project
Moving to wst.ws
Following the slightly outdated tutorial at http://www.eclipse.org/webtools/community/tutorials/BottomUpWebService/BottomUpWebService.html yields a workaround. If I first create the Dynamic Web Project and import the source, the Web Service wizard works. (I am still having issues with the generated client/proxy but that's another story).
Alex, the problem here is that the Dynamic Web Project created by the wizard is not equipped with a dependency on the Java Project containing your class. Without this dependency, the Apache Axis emitters running in the context of the Web project cannot "see" the class in the neighboring Java project. Another approach you can use is to create your Dynamic Web Project in advance of running the wizard (similar to the tutorial), open Properties on it, and on the "J2EE Module Dependencies" page select your Java project which should appear in the table of utility projects. Kathy, we need the wizard to at least raise a decent explanation to the user when the Java class that has been selected is not loadable from the context of the Web project that will host the service. Please also update the Web service tutorials to explain how to create Web services bottom-up from classes in Java projects. The best solution is for us to create the dependency automatically, however, this becomes a bit tricky as the set of pre-existing Java projects becomes more intricate, or when Web projects with dependencies already exist. Targetting to M6 for at least a clear error message.
Chris: Better error message and updated doc would be sufficient for me. Thank you for detailing the workaround. For a simple test case above it works as you've described but as soon as I try a real-world, complex project with dependencies things go really wrong. ClassCastExceptions rule the day and Axis barfs on things that (acc. to Axis bugzilla) have been fixed back in Axis 1.1. I applaud the usability of the Web Service features in Eclipse but at the moment the implementation seems very fragile. Nevertheless, I'll keep trying and filing bugs.
Kathy, as just discussed, returning as a duplicate of bug 132905. The traversal we need to do to validate Java classes as complying to JAX-RPC should include checking for incomplete build paths. *** This bug has been marked as a duplicate of 132905 ***
As we are trying to close down WTP 1.5, please get the latest WTP 1.5 driver to verify the bug and reopen if the problem had not been fixed. If this defect is not verified/reopened by end of day 06/16, I'll attempt to verify the defect by reproducing the problem as described in the defect. However, since you know your scenario best, it would be more appropriate if you verify the fix.
This is part of a mass update to close out all stale WTP resolved bugs from the 1.0.x and 1.5.0 timeframe. If you feel this bug was closed inappropriately, please reopen. Thanks, John Lanuti