I was very happy using Axis and Tomcat in this SOA world until recently where I had to implement a webservice and Axis gave me a lot of problems using the wsdl that was provided to me.
Someone pointed me to jax-ws (ri 2.1) and converting the wsdl to java (using wsimport) didn’t cause any problems. But now I still had to get the service running. I tried Tomcat 5.5 and 6 but they kept complaining about jaxb 2.1. I tried everything, I’ve put jaxb-api and jaxws-api in lib/endorsed of the jdk (6) and also put all the jax-ws jars in ${CATALINA_BASE}/shared/lib but tomcat kept complaining.
Since I didn’t really want a separate server but liked to have the webservice integrated with my application I went and have a look at Jetty. I managed to get everything running in Jetty without too much hassles.
You can run Jetty embedded and still make use of the jetty.xml (look at jetty documentation on how to do this). Make sure you have a webapps directory and, for every webservice, make a subdir that has a WEB-INF.
Its vital that you put a web.xml and a sun-jaxws.xml in the WEB-INF. You should also make a wsdl dir where you place the wsdl.
Make sure to make the necessary changes to all these xml files. The fromwsdl sample from jax-ws should point you in the right direction.
The only problem I have now is that rpc/encoded wsdls are not supported in JAXWS 2.0. So for some services I still may need to resort to another solution.
I had exactly the same problem as you trying to get JAXB 2.1 working with tomcat 6 under jdk 1.6. Tomcat seems to completely ignore the endorsed dir mechanism.
I eventually got it to work by creating ${catalina.home}/endorsed and put jaxb-api.jar and jaxb-impl.jar into this directory. I’ve been using jaxws-2.1 with no problems since.
By: Rob Blake on 6 September, 2007
at 14:37
I’m looking at run jax-ws 2.1 using jetty embedded. Would you mind posting more information about how you made this work. I currently use an Axis/Jetty combo and would like to switch to JAX-WS/Jetty combo.
By: Michael Crump on 11 January, 2008
at 21:23