I get this error message on the server when trying to access a service (and as a result http 404 error on client side)
WARNING: No endpoint mapping found for [SaajSoapMessage {http://rehabworks/webservice/casesearch/schema}findByConsumerCriteriaRequest]
web.xml is pretty straightforwardThe mapping servlet file is pretty much what we have in airlineCode:<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <display-name>CaseSearchWebService</display-name> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>ws</servlet-name> <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>ws</servlet-name> <url-pattern>/services</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ws</servlet-name> <url-pattern>*.wsdl</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
And the endpoint implementation is pretty straight tooCode:<bean id="marshallingEndpoint" class="dars.dcss.webservice.CaseSearchEndpoint"> <constructor-arg ref="caseSearchService"/> </bean> <bean id="caseSearchService" class="dars.dcss.webservice.CaseSearchService" /> <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="contextPath" value="dars.dcss.webservice"/> <property name="mtomEnabled" value="false"/> </bean> <!-- ===================== ENDPOINT MAPPINGS ============================== --> <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"> <property name="interceptors"> <list> <bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/> </list> </property> <property name="order" value="1"/> </bean> <!-- ===================== ENDPOINT ADAPTERS ============================== --> <bean class="org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter"> <description> This adapter allows for methods that need and returns marshalled objects. The MarshallingEndpoint uses JAXB2 objects. </description> <constructor-arg ref="marshaller"/> </bean> <!-- ===================== WSDL DEFINITION ============================== --> ............
Any idea why the end point is not mapped correctly (the payload annotation seem to be exact as the one reported in the error)Code:public class CaseSearchEndpoint { private static final Log logger = LogFactory.getLog(CaseSearchEndpoint.class); private final CaseSearchService casesearchService; private ObjectFactory objectFactory = new ObjectFactory(); public CaseSearchEndpoint(CaseSearchService casesearchService) { Assert.notNull(casesearchService, "casesearchService must not be null"); this.casesearchService = casesearchService; } @PayloadRoot(localPart = "findByConsumerCriteriaRequest", namespace = "http://rehabworks/webservice/casesearch/schema") public JAXBElement<CaseSearchResult> findByConsumerCriteria(FindByConsumerCriteriaRequest csc) { //casesearchService System.out.println(csc.getConsumerSearchCriteria().getValue().caseId); return objectFactory.createFindByConsumerCriteriaResponseReturn(new CaseSearchResult()); } }


Reply With Quote