title: Generating a web service server implementation using wsdl2java in CXF
body: <p><em><strong></em> Background :</strong></p>
  
  <p>I have prior experience working on consuming Apache CXF web services but I am a bit new to generating a service endpoint interface (SEI) and a service implementation using the wsdl2java tool that comes along with the Apache CXF distribution.</p>
  
  <p><strong>The task :</strong> </p>
  
  <p>I am currently working on the implementation of a SOAP based web-service that will be consumed by external systems. I have already defined the messages (XSD) and the WSDL file. I have tried generating the SEI by using the wsdl2java tool from Apache CXF. The SEI gets generated correctly with the JAXB types as the input parameters and return types to the web service methods.</p>
  
  <p>When I take a look at the code generated for the service implementation class, I see that it extends the javax.xml.ws.Service class. Also, a lot of overloaded methods are generated which have the same name as the methods in the service endpoint interface with "Soap12Http" appended to the method name. A few of these methods take the parameter of type WebServiceFeature... features whereas the others don't take any parameters. Example : </p>
  
  <pre><code>public class Query extends Service {
  
          @WebEndpoint(name = "product_query-soap12-http")
      public IQuery getProductsSoap12Http(WebServiceFeature... features) {
          return super.getPort(getProductsSoap12Http, IQuery.class,features);
      }
  }
  </code></pre>
  
  <p>*where IQuery is the service endpoint interface </p>
  
  <p><strong>The problem :</strong></p>
  
  <ol>
  <li>I was expecting the service implementation class to implement the service endpoint interface instead of extending javax.xml.ws.Service. Is this a valid expectation?</li>
  <li>I was expecting the service implementation class to implement the methods from the service endpoint interface. Is this a valid expectation?</li>
  <li>I would also like to know if the wsdl2java command can be asked to generate a jar for the JAXB POJOS instead of generating them as class files. </li>
  </ol>