title: Spring WS seems to ignore mapped endpoint
body: <p>I'd like to add a consumable contract-first webservice to a Spring MVC application - the application is the webservice provider. In <code>web.xml</code> I added a second servlet which should take care of the requests:</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;webservices&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.ws.transport.http.MessageDispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:/webservices-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;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;webservices&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p><code>webservices-servlet.xml</code> contains:</p>
  
  <pre><code>&lt;context:component-scan base-package="de.y.application" /&gt;
  
  &lt;sws:static-wsdl id="yAdaptorService" location="/WEB-INF/wsdl/yAdapterService.wsdl" /&gt;
  
  &lt;bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"&gt;
      &lt;property name="interceptors"&gt;
          &lt;list&gt;
              &lt;bean
                  class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" /&gt;
              &lt;bean
                  class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"&gt;
                  &lt;property name="schema" value="/WEB-INF/wsdl/ResourceAdapter.xsd" /&gt;
                  &lt;property name="validateRequest" value="true" /&gt;
                  &lt;property name="validateResponse" value="true" /&gt;
              &lt;/bean&gt;
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="order" value="1" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>When the application is deployed and started in Tomcat 7 the WSDL is deployed at
  <code>http://localhost:8080/application/services/yAdapterService.wsdl</code></p>
  
  <p>The relevant WSDL snippets:</p>
  
  <pre><code>&lt;message name="pingRequest"&gt;
  &lt;/message&gt;
  &lt;message name="pingResponse"&gt;
  &lt;/message&gt;
  &lt;portType name="yAdaptor"&gt;
      &lt;operation name="ping"&gt;
          &lt;input message="tns:pingRequest"&gt;&lt;/input&gt;
          &lt;output message="tns:pingResponse"&gt;&lt;/output&gt;
      &lt;/operation&gt;
  &lt;/portType&gt;
  &lt;binding name="SoapBinding" type="tns:yAdapter"&gt;
      &lt;wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
      &lt;operation name="ping"&gt;
          &lt;wsdlsoap:operation soapAction="urn:webservice.y.x.com:wsdl/ping"/&gt;
          &lt;input&gt;
              &lt;wsdlsoap:body use="literal"/&gt;
          &lt;/input&gt;
          &lt;output&gt;
              &lt;wsdlsoap:body use="literal"/&gt;
          &lt;/output&gt;
      &lt;/operation&gt;
  &lt;/binding&gt;
  &lt;service name="yAdapterService"&gt;
      &lt;port binding="tns:SoapBinding" name="yAdapterSoapPort"&gt;
          &lt;wsdlsoap:address location="http://localhost:8080/application/services/yAdapterService"/&gt;
      &lt;/port&gt;
  &lt;/service&gt;
  </code></pre>
  
  <p>Setting logger to debug level, Tomcat tells me during startup:</p>
  
  <pre><code>09 Jan 2014 12:20:49,247 DEBUG org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping:105 - Mapped [{urn:webservice.x.com:wsdl}ping] onto endpoint [public void de.y.yAdapterService.ping()]
  </code></pre>
  
  <p>But when it comes to a simple ping-request via SOAP-UI</p>
  
  <p><code>SOAPAction: urn:webservice.x.com:wsdl/ping</code></p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;soapenv:Header/&gt;
      &lt;soapenv:Body/&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>to this endpoint</p>
  
  <pre><code>private static final String NAMESPACE_URI   = "urn:webservice.x.com:wsdl";
  
  @Override
  @PayloadRoot(localPart = "ping", namespace = NAMESPACE_URI)
  public void ping()
  {
      System.out.println("ping pong");
  }
  </code></pre>
  
  <p>the mapped endpoint cannot be found</p>
  
  <pre><code>/* SOAP-UI REQUEST ON urn:webservice.x.com:wsdl/ping */
  09 Jan 2014 12:21:44,808 DEBUG     org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter:136 - Opening JPA EntityManager in OpenEntityManagerInViewFilter
  09 Jan 2014 12:21:44,818 DEBUG org.springframework.security.util.FilterChainProxy:205 - Converted URL to lowercase, from: '/services/yadapterservice'; to: '/services/yadapterservice'
  09 Jan 2014 12:21:44,818 DEBUG org.springframework.security.util.FilterChainProxy:212 - Candidate is: '/services/yadapterservice'; pattern is /services/**; matched=true
  09 Jan 2014 12:21:44,818 DEBUG org.springframework.security.util.FilterChainProxy:165 -  has an empty filter list
  09 Jan 2014 12:21:44,827 DEBUG org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter:114 - Accepting incoming [org.springframework.ws.transport.http.HttpServletConnection@63a595be] at [http://localhost:8080/application/services/yAdapterService]
  09 Jan 2014 12:21:44,864 DEBUG org.springframework.ws.server.MessageTracing.received:171 - Received request [SaajSoapMessage]
  09 Jan 2014 12:21:44,875 DEBUG org.springframework.ws.soap.server.SoapMessageDispatcher:278 - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@b64f867] has no mapping for request
  09 Jan 2014 12:21:44,876  WARN org.springframework.ws.server.EndpointNotFound:241 - No endpoint mapping found for [SaajSoapMessage]
  09 Jan 2014 12:21:44,877 DEBUG org.springframework.ws.transport.http.MessageDispatcherServlet:966 - Successfully completed request
  09 Jan 2014 12:21:44,877 DEBUG org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter:154 - Closing JPA EntityManager in OpenEntityManagerInViewFilter
  09 Jan 2014 12:21:44,878 DEBUG org.springframework.orm.jpa.EntityManagerFactoryUtils:338 - Closing JPA EntityManager
  </code></pre>
  
  <p>What am I missing? Why is the initially mapped endpoint not found?</p>