title: Deploying a CXF web service in Spring Framework
body: <p>After running through the CXF samples I had a simple web service up and running fine. However I would like to integrate it with a Spring web application inside a servlet container. After updating the servlet.xml config file: </p>
  
  <pre><code>&lt;jaxws:endpoint id="HelloWorldService"
  implementor="path.to.webservice.HelloWorldImpl"
  endpointName="e:HelloEndpoint"
  serviceName="s:HelloService"
  address="/HelloService"
  xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
  xmlns:s="http://service.jaxws.cxf.apache.org/service"/&gt;
  </code></pre>
  
  <p>and web.xml:</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
          org.apache.cxf.transport.servlet.CXFServlet
      &lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>I was able to deploy it in the servlet but the WSDL of the Spring service is horribly wrong even though the Java interface and implementing files are identical. See Eclipse WSDL outlines below:</p>
  
  <p><a href="http://img171.imageshack.us/i/correcty.jpg/" rel="nofollow noreferrer" title="correct">alt text http://img171.imageshack.us/i/correcty.jpg/</a><a href="http://img190.imageshack.us/i/wrongia.jpg/" rel="nofollow noreferrer" title="wrong">alt text http://img190.imageshack.us/i/wrongia.jpg/</a></p>
  
  <p>Why would such different WSDL be generated from identical .java files and how can I get it working in the servlet? Thanks in advance.</p>