title: Generate WebService from WSDL in Spring, Maven (contract first)
body: <p><em>I want to create a contract first <strong>Spring webservice</em></strong>. So I have the WSDL file, but I can't find any example of generating the Spring webservices from the WSDL.</p>
  
  <p>With this Maven plugin, I can generate it, but it will be a J2EE WebService, and not a Spring WebService, am I Right?:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.jvnet.jax-ws-commons&lt;/groupId&gt;
      &lt;artifactId&gt;jaxws-maven-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
          &lt;xdebug&gt;true&lt;/xdebug&gt;
          &lt;verbose&gt;true&lt;/verbose&gt;
          &lt;target&gt;2.0&lt;/target&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;generate-service&lt;/id&gt;
              &lt;goals&gt;
                  &lt;goal&gt;wsimport&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;wsdlDirectory&gt;src/main/resources/wsdls&lt;/wsdlDirectory&gt;
                  &lt;wsdlFiles&gt;
                      &lt;wsdlFile&gt;service.wsdl&lt;/wsdlFile&gt;
                  &lt;/wsdlFiles&gt;
                  &lt;sourceDestDir&gt;target/generated-code/src&lt;/sourceDestDir&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>This will generate an interface, which has the <strong>@WebService</strong> annotation. But this <strong>is</strong> for the <strong>J2EE</strong> application, <strong>and not Spring</strong>, right?</p>
  
  <blockquote>
    <p><strong>So, is there any tool in maven for generate Spring WebServices from an
    already written WSDL file?</strong></p>
  </blockquote>
  
  <p>Because I cannot find any, only the jaxws-Maven-plugin.</p>