No adapter for endpoint; Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?

前端 未结 8 1066
遥遥无期
遥遥无期 2021-02-05 07:45

I am struggling with an Spring-WS with JMS example. I set the Spring-WS and JMS wiring as per the Spring recommendations. But I kept getting following error. I dont know how to

8条回答
  •  不知归路
    2021-02-05 07:59

    I had a similar error message. My problem was in request and response class that I generated from XSD. It missed @XMLRootElement annotation. This caused that description of operation (in WSDL) and description of implemented method (in Endpoint) did not match. Adding JAXBElement to my endpoint method solved my problem.

    import javax.xml.bind.JAXBElement;
    
    @PayloadRoot(namespace = "http://foo.bar/books", localPart = "GetBook")
    @ResponsePayload
    public JAXBElement getBook(@RequestPayload JAXBElement myRequest) {
        ...
    

    See this blog for more details: spring-ws: No adapter for endpoint

提交回复
热议问题