I have a JAX-WS web service application which deploys as a WAR file for Tomcat 7. It uses a recent version of the Metro libraries, which I include inside the WAR file, and it works fine.
I'm trying to simplify the deployment package. I understand that the Sun JDK includes a copy of Metro (see this question and this one for example), yet for some reason, it's apparently mandatory to replace this copy of metro with one downloaded from the glassfish site. I'm trying to understand if it's possible to get by with just Tomcat and the metro implementation that comes with the JDK, or if not why not.
The WAR contents are as follows (class files removed):
META-INF/MANIFEST.MF
WEB-INF/classes/
WEB-INF/classes/com/[et cetera]
WEB-INF/ibm-web-ext.xml
WEB-INF/lib/
WEB-INF/lib/stax-api.jar
WEB-INF/lib/webservices-api.jar
WEB-INF/lib/webservices-extra-api.jar
WEB-INF/lib/webservices-extra.jar
WEB-INF/lib/webservices-rt.jar
WEB-INF/lib/webservices-tools.jar
WEB-INF/sun-jaxws.xml
WEB-INF/web.xml
wsdl/
wsdl/MyService.wsdl
web.xml
contains, in part:
<servlet>
<servlet-name>MyService</servlet-name>
<servlet-class>
com.sun.xml.ws.transport.http.servlet.WSServlet
</servlet-class>
</servlet>
When I remove the webservices-* jars--the Metro jars--from the WAR, the web service fails with the error " Wrapper cannot find servlet class com.sun.xml.ws.transport.http.servlet.WSServlet or a class it depends on". This isn't surprising because I can't find that class anywhere in the jars that come with Java 7 SE.
So, what does it mean to say that Java 7 comes with Metro, if you have to download another copy of Metro to make something like this work? Is it possible to run a JAX-WS web service within Tomcat using just the jars that come with Java?