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

  • How to define a Default Endpoint

    Hello,

    Im fairly new to spring-ws, what Im trying to do is to setup a default endpoint for my WS to serve as the default handler to all 'stray' requests (i.e. not matching namespace and local part) but having issues setting this up. Im currently getting the following error:

    Code:
    org.springframework.ws.soap.client.SoapFaultClient Exception: No adapter for endpoint [com.xxx.DefaultEndpoint@7a5a7a5a]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?

    Im confused as to what the default handler class should look like neither could find any examples on the web for this. Below is what i have currently for my default endpoint class (which is obviously doesnt work):


    Code:
    import org.springframework.ws.server.endpoint.annotation.Endpoint;
    
    @Endpoint
    public class DefaultEndpoint {
    
        public void handleDefault(){
            System.out.println("i was called....");
        }
    }
    Is there some annotation which needs to be applied to the 'handleDefault' method of the endpoint ?

    Im pretty confident that my spring configuration is correct:

    Code:
    <bean id="messageDispatcher" class="org.springframework.ws.soap.server.SoapMessageDispatcher">
            <property name="endpointMappings">
                <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
                    <property name="defaultEndpoint">
                        <bean class="com.xxx.kms.ws.DefaultEndpoint"/>
                    </property>
                </bean>
            </property>
        </bean>
    Any ideas will be greatly appreciated!

    Cheers.
    Last edited by zzkhan; Jul 27th, 2012, 09:47 AM. Reason: additional information
Working...
X