I'm trying to run the <wsimport> task in ANT (within Eclipse), using the following taskdef:
Obviously, the necessary Jax-ws libs are not in the classpath. If they're included with J2SE 1.6, where can I find them?
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?
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?
But having said that, it is possible, if for no other reason than to get the newest JAX-WS and JAXB. See here for how to do that: https://jax-ws.dev.java.net/guide/Using_JAX_WS_2_1_with_JavaSE6.html
JAX-WS 2.1.1 is included in the JDK 1.6 build 11
JAX-WS 2.1.5 Release Notes: Running on top of JDK 6
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:.
See Running JAX-WS Samples with Tomcat 6.x