Announcement Announcement Module
Collapse
No announcement yet.
No endpoint mapping found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    CaseSearchEndpoint needs to be annotated with @Endpoint.

    Comment


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

      Comment


      • #4
        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

        Comment


        • #5
          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?

          Comment


          • #6
            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, 09:21 AM.

            Comment


            • #7
              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.

              Comment


              • #8
                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

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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?

                    Comment


                    • #11
                      Are your Marshalled input and output object classes mapped with @XmlType, won't work without that. Just being able to marshal (using @XmlRootElement) isn't enough.

                      Comment


                      • #12
                        You need to make sure that the request parameters are correct. Also, if you are writng JUnit, then the response type should match with the variable type to which it will be assigned. Also, make sure that the any beans have been correctly instantiated.

                        Comment


                        • #13
                          Does your endpoint implement a supported interface like MessageHandle

                          It is XSD related issue, you need to correct your XSD. Generally when you are playing with JAXB, this problem will occur , you must need to define request and response correctly.

                          This issue is resolved. For example if your input request element is 'InsertRequest' so need to define like

                          <xs:element name="InsertRequest">
                          <xs:annotation>
                          <xs:documentation>Root element for Record Insert Request</xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                          <xs:sequence>
                          <xs:element name="GeneralDetails" type="tns:GenralDetailsType"></xs:element>
                          <xs:element name="FullDetails" type="tns:FullDetailsType"></xs:element>
                          </xs:sequence>
                          </xs:complexType>
                          </xs:element>

                          ---------------
                          Previously i was defined this as mention below:- so when i am creating JAXB beans it always create two elements for this, which element (InsertRequest or InsertRequestType) need to refer in endpoint, this was the issue.

                          <element name="InsertRequest" type="tns:InsertRequestType"></element>


                          <complexType name="InsertRequestType">
                          <sequence>
                          <element name="GeneralDetails" type="tns:GenralDetailsType"></element>
                          <element name="FullDetails" type="tns:FullDetailsType"></element>
                          </sequence>
                          </complexType>

                          Comment


                          • #14
                            Now i got an answer thanks for sharing.....

                            Comment

                            Working...
                            X