Results 1 to 10 of 14

Thread: No endpoint mapping found

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Posts
    27

    Default No endpoint mapping found

    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 straightforward
    Code:
    <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>
    The mapping servlet file is pretty much what we have in airline
    Code:
        <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    ============================== -->
          ............
    And the endpoint implementation is pretty straight too
    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());
    	}
    }
    Any idea why the end point is not mapped correctly (the payload annotation seem to be exact as the one reported in the error)

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    CaseSearchEndpoint needs to be annotated with @Endpoint.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  3. #3
    Join Date
    Oct 2006
    Posts
    27

    Default

    Actually I did have @Endpoint annotation in CaseSearchEndpoint. I made a mistake not copying/pasting correctly. Any other clues?

  4. #4
    Join Date
    Oct 2006
    Posts
    27

    Default

    I found the problem. It had to do with case sensitivity in localPart + an issue with my compile setting.

    Please ignore this issue. Sorry for confusion. I still have some other issues that I am working on related to this service. Will ask for help if needed

    Thanks
    SSquare

  5. #5
    Join Date
    Dec 2007
    Posts
    15

    Default

    what was the issue with compile setting .....i am gettin same error and i checked local part its same as in xsd used in wsdl.

    However my marshalled object has different className is it fine?

  6. #6
    Join Date
    Dec 2007
    Posts
    15

    Default

    Now i am getting this error ....

    No adapter for endpoint [com.endpoint.HelloWorldMarshalledEndpoint@1e2291d]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
    I am using custom serializable object registered in marshaller as param in endpoint method.

    Done following definition in spring config xml.

    <bean class="org.springframework.ws.server.endpoint.adap ter.GenericMarshallingMethodEndpointAdapter">
    <constructor-arg ref="marshaller"/>
    </bean>



    dont know how do u register adapter for endpoint..

    help me to solve this error....
    Last edited by virfal; Dec 14th, 2007 at 09:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •