title: JAX-WS Implementation included with Java?
body: <p>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.</p>
  
  <p>I'm trying to simplify the deployment package. I understand that the Sun JDK includes a copy of Metro (see <a href="https://stackoverflow.com/questions/3206681/how-to-deploy-a-jax-ws-service-to-eclipse-or-tomcat?rq=1">this question</a> and <a href="https://stackoverflow.com/questions/12670261/metro-vs-javas-jax-ws">this one</a> 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.</p>
  
  <p>The WAR contents are as follows (class files removed):</p>
  
  <pre><code>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
  </code></pre>
  
  <p><code>web.xml</code> contains, in part:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;servlet&gt;
      &lt;servlet-name&gt;MyService&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
          com.sun.xml.ws.transport.http.servlet.WSServlet
      &lt;/servlet-class&gt;              
  &lt;/servlet&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>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?</p>