title: Spring Generate domain objects based on a WSDL possible package conflict
body: <p>I'm currently developing a web service client following this instruction on <a href="http://spring.io/guides/gs/consuming-web-service/" rel="nofollow">spring website</a>:</p>
  
  <blockquote>
    <p>The interface to a SOAP web service is captured in a WSDL. JAXB provides an easy means to generate Java classes from a WSDL.</p>
  </blockquote>
  
  <p>So this tutorial is suggesting use of maven-jaxb2-plugin to generate java classes from WSDL. I have already implemented the web service <strong>server</strong> and it has its own package structure which is not similar to the client package structure.</p>
  
  <p>In addition in pom.xml, I can ask maven to place the generated class files into a specific package (in this case hello.service):</p>
  
  <pre><code>&lt;generatePackage&gt;hello.service&lt;/generatePackage&gt;
  </code></pre>
  
  <p>Now my question is: when JAXB is generating the java classes and placing them in the specified directory, Is there a way to modify the class package name of these classes to comply with client package structure?</p>
  
  <p>Just to be more clear these classes have a package structure defined on the server side and now I am placing them inside a package in client side which may or may not match the server...</p>
  
  <p>And where is the correct place to put this generated classes? I read in another article that it is not a good practice to place them in <strong>src/main</strong>?</p>