Alright, I figured it out. For the curious: Just run the jar. It launches some sort of license agreement / download manager, and downloads the libraries you'll actually need.
NEXT PROBLEM: The code generated by <wsimport> contains compilation errors (JAX-WS 1.5 On JDK6). Sample code:
When I try to compile this, ANT throws the following:
The superclass for CustomerWS is javax.xml.ws.Service, and the getPort method looks like this:
Which seems a little strange to me, given that javax.xml.ws.Service isn't a Parameterized class. But then again I don't know much about Generics. Even without the fancy Generics though, it's obvious the JAX-WS generated code is calling a method with three parameters, that doesn't happen to exist. Do I have the wrong version of something?
All right, I got around that by commenting out the offending method. Now, when I deploy my application, and try to hit a web service, I get the following:
Endorsed? I don't get it. Does this mean I'm using an older version of something, or a newer, unsupported version of something else? This is complete gibberish to me, and now I'm stuck. Can anyone help?
It's a bit tricky to replace classes built onto the JRE with different versions. JAX-WS and JAXB go hand in hand, so you should either replace both, or neither. Personally, I'd start by trying to fix the Ant problem before I tried to replace the built-in versions.
release notes wrote:
6. Running on top of JDK 6
JDK 6u4 includes JAX-WS 2.1 and JAXB 2.1 API and RI. JAX-WS RI 2.1.5 includes newer and enhanced RI of JAX-WS/JAXB 2.1. In order to run JAX-WS RI 2.1.5 you would need to put the jars in the classpath(endorsed mechanism is not required anymore).
Furthermore you need to tell Tomcat where the separate jars are. For Tomcat 6.0 you need to modify conf/catalina.properties to load the JAX-WS jars.
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
Thanks for your help, guys. This turned out to be a problem with JAVA_HOME and CLASSPATH on the local dev machine I was using. By NOT including the JAX-WS libraries in the distributable WAR file, Tomcat loaded the whole thing from the JRE, which was perfect. Problem Solved!
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop