aspose file tools*
The moose likes Web Services and the fly likes Stupid Question: Where the heck can I download JAX-WS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Stupid Question: Where the heck can I download JAX-WS?" Watch "Stupid Question: Where the heck can I download JAX-WS?" New topic
Author

Stupid Question: Where the heck can I download JAX-WS?

Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
I've ready it's included with J2SE 1.6, but Ant still can't find the proper class. The only place I can find for downloads gives me a jar file with a single class in it (Main.class).

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?

thanks!
Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
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?

HELP!
Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
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?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
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.

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


Ping & DNS - my free Android networking tools app
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
javax.xml.ws.Service.getPort(javax.xml.namespace.QName,java.lang.Class,javax.xml.ws.WebServiceFeature...) has been available since JAX-WS 2.1.

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.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "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:.
shared.loader=C:/opt/jaxws-ri/lib/*.jar


See Running JAX-WS Samples with Tomcat 6.x
Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
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!

thanks again,
 
wood burning stoves
 
subject: Stupid Question: Where the heck can I download JAX-WS?