Announcement Announcement Module
No announcement yet.
No adapter for endpoint error when using XPathParamAnnotationMethodEndpointAdapter Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • No adapter for endpoint error when using XPathParamAnnotationMethodEndpointAdapter

    When testing my web service on the soapui client i get this in the response:
    No adapter for endpoint [public javax.xml.transform.Source point.messageRecall(int) throws agementException,javax.xml.bind.JAXBException]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?</faultstring>

    I have an OrderEndpoint that uses the @XPathParam and @PayloadRoot.I also have the adapters and endpoint mappings defined in the spring-ws-servlet.xml and have the appropriate .jars in my web-inf/lib.

    Following is a part of the spring-ws-servlet.xml i have written:

    <bean id="OrderEndpoint" class=" rderEndpoint">
    <constructor-arg ref="orderService"/>
    <constructor-arg ref="marshaller"/>

    <bean id="orderService" class=" ice.impl.OrderServiceImpl"/>

    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    <property name="contextPath" value=" ma"/>

    <bean class=" ing.PayloadRootAnnotationMethodEndpointMapping">

    <bean class=" ter.XPathParamAnnotationMethodEndpointAdapter">
    This adapter allows for methods that use @XPathParam annotations. The XPathAirlineEndpoint uses JAXB2 these.
    <property name="namespaces">
    <prop key="tns"></prop>

  • #2

    @XPathParam does not work on int parameters, only on types supported by xpath itself (which means doubles for numbers). It's mentioned in the javadoc here (Linking to the Google cache, since it appears is down for the moment).


    • #3
      Hi Arjen,
      Thanks for the reply but this is the method i am using:

      * This endpoint method uses XPath to handle message with a <code>&lt;OrderSendRequest&gt;</code> payload.
      * @param id id
      * @param message message
      @PayloadRoot(localPart ="OrderSendRequest", namespace = "")
      public Source orderSend(@XPathParam("//tns:id")String id,@XPathParam("//tns:message")Order order) throws OrderException,JAXBException {

      String orderId= orderService.orderSend(id,message);

      OrderSendResponse response = objectFactory.createOrderSendResponse(id);
      return new MarshallingSource(marshaller, response);

      So u mean to say that XPath cannot be used in the above case cause im using a user defined type Order.Is that the reason im getting that error message ,so i guess i would have to use antoher endpoint adapter.


      • #4
        Exactly. For instance, when Order is a class "known" to a marshaller (generated by xjc, for instance), you could use the MarshallingMethodEndpointAdapter