title: Spring-ws best way to generate java classes when autogeneration WSDL
body: <p>I am autogenerating my wsdl using spring-ws and an XSD. Now I would like to generate java classes to return and do marschalling.</p>
  
  <p>However I am seeing a lot of different ways to accomplish this, and not all are as clear about the benefit\detrement.</p>
  
  <p>Some just save the generated WSDL in their project, others use their XSD file to generate, others add XJB etc...</p>
  
  <p>My first thought was just adding:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;com.sun.tools.xjc.maven2&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jaxb-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;generate&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;removeOldOutput&gt;true&lt;/removeOldOutput&gt;
                  &lt;schemaDirectory&gt;src/main/webapp/WEB-INF&lt;/schemaDirectory&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>to my <code>pom.xml</code></p>