Announcement Announcement Module
Collapse
No announcement yet.
Help with Default Endpoint Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Default Endpoint

    I am using "PayloadRootAnnotationMethodEndpointMapping" to map incoming request messages to End Points. If user sends a bad request or a wrong namespace I want to display customized error message.

    To do this I created another endpoint with @Endpoint annotation and set the property 'defaultEndpoint' on PayloadRootAnnotationMethodEndpointMapping to this end point. But this is not working.

    I am not sure what should be the localPart mapping in the Endpoint class because client could sent any type of message. Can any one please help me with the steps for 'defaultEndpoint' for PayloadRootAnnotationMethodEndpointMapping. I am particularly interested how to map the incoming request to default endpoint method.

    Thank you!

  • #2
    Solution found?!

    I am also trying to do this and facing the same problem. My current config is as follows :-

    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootAnnotationMethodEndpointMapping">
    <property name="defaultEndpoint" ref="defaultEndpoint"/>
    </bean>

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

    <oxm:xmlbeans-marshaller id="marshaller" />

    <bean id="defaultEndpoint" class="gf.MyDefaultEndpoint">
    </bean>

    and MyDefaultEndpoint :-

    public class MyDefaultEndpoint implements PayloadEndpoint {

    public Source invoke(Source arg0) throws Exception {
    ...
    }
    }

    When I run this I recieve the error :-

    org.springframework.ws.soap.client.SoapFaultClient Exception: No adapter for endpoint [com.bskyb.common.communication.interaction.endpoin t.DefaultEndpoint@7a5a7a5a]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?

    As you can see my class does implement PayloadEndpoint.

    What else is required - and why do I get that message when the class does implement one of the two supported interfaces?

    The reference documentation for spring-ws mentions the defaultEndpoint in section 5.5 :-

    "Additionally, there is the 'defaultEndpoint', which is the default endpoint to use, when this endpoint mapping does not result in a matching endpoint"

    but does not provide much information about how to configure or what requirements there are on the default endpoint class.

    Any ideas?

    thanks,

    Gary.
    Last edited by gflood; Nov 3rd, 2009, 04:42 PM. Reason: Provide more info

    Comment


    • #3
      More details

      The error I am seeing is due to GenericMarshallingMethodEndpointAdapter.supports(O bject endpoint) being called from the MessageDispatcher and returning false. I have added an @Endpoint and @PayloadRoot to this class/method respectively but it has not made any difference.

      Comment


      • #4
        Hello there, I am facing the exact same issue ans was wondering if you found a solution for this?

        Comment

        Working...
        X