title: WsImport ant task and JDK 6
body: <p>I am trying to use jax-ws to generate web service proxy classes, using the wsimport ant task, similarly to <a href="https://stackoverflow.com/questions/5091573/taskdef-class-com-sun-tools-ws-ant-wsimport-cannot-be-found-following-the-java-w">this question</a>, with the following follow-on question:</p>
  
  <p>As I understand it, more recent versions of JDK 1.6 include jax-ws and the WsImport ant task is defined in the JDK's tools.jar file.</p>
  
  <p><strong>Why does ant not find this automatically?</strong></p>
  
  <p><strong>Why does eclipse not find this automatically as well?</strong></p>
  
  <p>I found a few references to using jax-ws with JDK 6, but these seem to be based on copying a separately downloaded jax-ws library and dropping it into the JDK ext folder (which I assume is no longer required given that it is actually bundled with the JDK now).</p>
  
  <p><strong>What is the proper way to use the wsimport task with a version of JDK 1.6 that already includes jax-ws?</strong></p>
  
  <p>My build XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project name="wsproxy"&gt;
      &lt;taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport" /&gt;
      &lt;target name="wsgentest"&gt;
          &lt;wsimport
              wsdl="http://localhost/Service?wsdl"
              destdir="bin-gen"
              sourcedestdir="src-gen"
              keep="true"
              verbose="true"
              package="com.ws"&gt;
          &lt;/wsimport&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>