title: Getting the WSDL from a CXF webservice running on Tomcat
body: <p>Answer:
  I know this is not the kind of thing that goes well as far as resolutions go, but I fiddled around with the web.xml and servlet.xml files, and for some reason, it works now, I can get the service list and wsdl files just fine now. I compared my new files to the old ones written below, and the only differences is that the web.xml has the name CXFServlet instead of LoginService, and I have given the cxfservlet.xml endpoint an address now.</p>
  
  <p>I have a issue where I have (Finally) made a CXF webservice deploy on Tomcat. Or, rather, it does start, and it does not produce any warnings or exceptions in the tomcat log when I deploy and redeploy. The problem is that I can't retrieve the WSDL of the service in question. I am beginning to think that I don't understand the web.xml and cxf.xml files as well as I thought.</p>
  
  <p>When I write <a href="http://localhost:8080/services/Login?wsdl" rel="nofollow">http://localhost:8080/services/Login?wsdl</a> I would expect the WSDL to pop up, but all I get is a 404. What am I doing wrong? As I said I am not getting any exceptions, so what is my problem?</p>
  
  <p>Edit:
  Due to some helpful feedback (that I remembered to mark as helpful) I realized that I might have set the context path wrong in my web.xml. I deploy the service through the manager app in tomcat in a file called LoginService.war.
  This begs the question: Can I even do that? Will tomcat know to look for the CXFServlet class in the LoginService lib, or will it look in the ROOT? Do I need to reconfigure the server to allow me to run from <a href="http://localhost:8080/LoginService" rel="nofollow">http://localhost:8080/LoginService</a>?</p>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd"&gt;
  
  &lt;web-app&gt;
  &lt;display-name&gt;LoginService&lt;/display-name&gt;
  &lt;context-param&gt;
  &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
  &lt;param-value&gt;classpath:metadata/Login/cxfservlet.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;listener&gt;
  &lt;listener-class&gt;
    org.springframework.web.context.ContextLoaderListener
  &lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;servlet&gt;
  &lt;servlet-name&gt;LoginService&lt;/servlet-name&gt;
  &lt;servlet-class&gt;
      org.apache.cxf.transport.servlet.CXFServlet
  &lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;LoginService&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>cxfservlet.xml</p>
  
  <pre><code> &lt;beans xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org
   /jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt;
   &lt;jaxws:endpoint id="LoginService"
   implementor="orgserver.services.Login" wsdlLocation="WEB-INF/LoginService.wsdl"
   address="/"&gt;
   &lt;/jaxws:endpoint&gt;
   &lt;/beans&gt;
  </code></pre>