title: No endpoint mapping found when setting up Spring Web Service
body: <p>I'm a beginner at setting up spring web-applications. I got this far but now I find myself stuck.</p>
  
  <p>I get the following error:</p>
  
  <pre><code>WARNING: No endpoint mapping found for [SaajSoapMessage {http://mycompany.com/weather/schemas}GetCities]
  </code></pre>
  
  <p>The main problem is that I have run out of ideas where to look for debug information. I fixed as many errors that I've seen, but now I can't even find something wrong in the logs. So I'm getting bit desperate. </p>
  
  <p>This my web.xml</p>
  
  <pre><code>&lt;web-app&gt;
      &lt;display-name&gt;Weather report webservice&lt;/display-name&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;spring-ws&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.ws.transport.http.MessageDispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/spring-ws-servlet.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;transformWsdlLocations&lt;/param-name&gt;
              &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;spring-ws&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/weatherws&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This is what my spring-ws-servlet.xml</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:context="http://www.springframework.org/schema/context"
     xmlns:sws="http://www.springframework.org/schema/web-services"
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
  
      &lt;context:component-scan base-package="path.to.weather"/&gt;
  
      &lt;sws:annotation-driven/&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>This is what my endpoint looks like:</p>
  
  <pre><code>@Endpoint
  public class WeatherEndpoint {
  
      private static final String NAMESPACE_URI = "http://mycompany.com/weather/schema";
  
      private WeatherReportManager manager;
  
      @Autowired
      public WeatherEndpoint(WeatherReportManager manager) throws JDOMException {
          this.manager = manager;
      }
  
      @PayloadRoot(namespace = NAMESPACE_URI, localPart = "GetCities")
      @ResponsePayload
      public Element getCities() {
          Element toReturn = null;
  
          for(City city : manager.getCities()) {
              //To some stuff
          }
  
          return toReturn;
      }
  }
  </code></pre>
  
  <p>This is the catalina.log as I see it right now. I tried to get Tomcat to output DEBUG messages by editing the logging.properties. This did not give any additional effect.</p>
  
  <pre><code>INFO: Deploying web application archive weather.war
  Feb 15, 2012 3:28:51 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'spring-ws': initialization started
  Feb 15, 2012 3:28:51 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'spring-ws-servlet': startup date [Wed Feb 15 15:28:51 EET 2012]; root of context hierarchy
  Feb 15, 2012 3:28:52 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-ws-servlet.xml]
  Feb 15, 2012 3:28:52 PM org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping afterPropertiesSet
  INFO: Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
  Feb 15, 2012 3:28:52 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
  INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@36496381: defining beans [weatherEndpoint,weatherReportManagerWWW,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping#0,org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationMethodEndpointMapping#0,org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping#0,org.springframework.ws.server.endpoint.adapter.method.dom.DomPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.SourcePayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.jaxb.XmlRootElementPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.jaxb.JaxbElementPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.dom.JDomPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter#0,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
  Feb 15, 2012 3:28:52 PM org.springframework.ws.soap.saaj.SaajSoapMessageFactory afterPropertiesSet
  INFO: Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
  Feb 15, 2012 3:28:52 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'spring-ws': initialization completed in 714 ms
  Feb 15, 2012 3:28:52 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory docs
  Feb 15, 2012 3:28:52 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory examples
  Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory host-manager
  Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory lib
  Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory manager
  Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory ROOT
  Feb 15, 2012 3:28:53 PM org.apache.coyote.http11.Http11Protocol start
  INFO: Starting Coyote HTTP/1.1 on http-8080
  Feb 15, 2012 3:28:53 PM org.apache.coyote.ajp.AjpProtocol start
  INFO: Starting Coyote AJP/1.3 on ajp-8009
  Feb 15, 2012 3:28:53 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 8777 ms
  Feb 15, 2012 3:29:07 PM org.springframework.ws.server.MessageDispatcher dispatch
  WARNING: No endpoint mapping found for [SaajSoapMessage {http://mycompany.com/weather/schemas}GetCities]
  </code></pre>
  
  <p>I would be very grateful for any assistance. If you need to see anything additional, just let me know.</p>