Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: No endpoint mapping found

  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.

  7. #7
    Join Date
    Dec 2007
    Posts
    4

    Default

    I have had similar problem with SimpleMethodEndpointMapping.
    And I have found - this problem has a dependence of structure of schema XSD.
    Why? I don't know.

  8. #8
    Join Date
    Dec 2007
    Posts
    15

    Default

    I am not able to understand what exactly do u mean by dependence of structure of schema XSD....


    if u are talking of schema used in wsdl generation then element structure of schema xsd and serializable object is same except name of object is "HelloRequest" and element is "helloRequest"....


    Please explain in details the problem dependency of xsd structure

  9. #9
    Join Date
    Dec 2007
    Posts
    4

    Default

    I generate сlasses from XSD shema using library Jaxb and use them as endpoints too.

    For example if you use named complexType in your schema, debbuger geterates error like this "WARNING: No endpoint mapping found for [SaajSoapMessage {http://rehabworks/webservice/casesearch/schema}findByConsumerCriteriaRequest]"

    There are other nuances will be. I just have changed my shema from that view:

    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="referbook_Response" type="referbookType"/>
    <xsd:complexType name="referbookType">
    <xsd:annotation>
    <xsd:documentation>
    ...
    </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="referbook_code" type="xsd:int">
    <xsd:annotation>
    <xsd:documentation>
    ....
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="referbook_name" type="xsd:string">
    <xsd:annotation>
    <xsd:documentation>
    ...
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="data" type="dataType" nillable="true">
    <xsd:annotation>
    <xsd:documentation>
    ... ... ...
    </xsd:schema>


    to this view:

    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="ReferbookCategoryResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="referbook_code"/>
    <xs:element ref="referbook_name"/>
    <xs:element ref="data"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>

    <xs:element name="referbook_code">
    <xs:simpleType>
    <xs:restriction base="xs:int"/>
    </xs:simpleType>
    </xs:element>

    <xs:element name="referbook_name">
    <xs:simpleType>
    <xs:restriction base="xs:string"/>
    </xs:simpleType>
    </xs:element>

    <xs:element name="data" nillable = "true">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="dataType"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    ... ... ...
    </xs:schema>


    Now it works perfectly.

  10. #10
    Join Date
    Dec 2007
    Posts
    15

    Default

    i have manually mapped xsd so that should not be a problem from my viewpoint


    and also one thing to mention is i am not getting "No endpoint found" error....that error is resolved by using payloadrootendpointmapping instead of marshallerendpoint.

    The error i am getting now is as follow:

    No adapter for endpoint [com.endpoint.HelloWorldMarshalledEndpoint@1e2291d]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?

Posting Permissions

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