Started on the The Java Web Services Tutorial just tonight. It is a pretty comprehensive guide to the Java Web Services Developer Pack 1.1. A dauntingly large body of technology, the WSDP ships with over 90(!) JAR files.
Diving into the tutorial, you first have to get Tomcat running. Chapter 3 Getting Started with Tomcat guides you through this process by compiling and deploying a tiny application consisting of a single JavaBean and a single JSP. Everything worked fine up to the final step, “ant install”.
At this point I got a FileNotFoundException. Half hour or so of reading the build.xml file and the ant documentation (I am an ant newbie), and I figure out that it means I need to define two properties on the ant command line: “ant -Dusername=blah -Dpassword=blah install”. I’m sure the tutorial could have told me about that. And FileNotFoundException?
With that behind me, it’s on to Chapter 11, Building Web Services With JAX-RPC. Again, everything worked fine up to the final step, “ant run”, which kicks off the client application. Boom!
Exception in thread “main” java.lang.NoClassDefFoundError: javax.xml.transform.Source
After working out what a javax.xml.transform.Source was—thanks Google—I finally traced it back to the build.properties file. Sun had misspelt “jaxp.home” as “jaxp.holme”. Grrrr.
OK, try again. “ant run”. Boom!
Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/net/ssl/HostnameVerifier
Back to Google again. This time it turned out that jsse.jar (whatever that is) was missing from the classpath. A little stuffing around with the unix find command, a little ant debugging with <echo> and it became clear I needed to add ”:${wlib}/jsse.jar” to the end of the wjars variable.
Try again. “ant run”. Success. My computer tells me:
Hello Duke!
So right now I’m pretty happy that I was able to get my computer to say hello to me after only three hours of effort. Pretty happy, even though my name isn’t Duke.
PS: I fired off an email to jwsdp-feedback@sun.com.