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

前端 未结 8 1079
遥遥无期
遥遥无期 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:58

    I was using WSDL file and did as below, then it worked.

      @PayloadRoot(namespace = "http://www.myservice/v1.0/query", localPart = "queryRequest")
      @ResponsePayload
      public JAXBElement queryAddrLocation(@RequestPayload JAXBElement queryRequest) {
        System.out.println("Welcome to " + queryRequest);
        return createJaxbElement(new QueryResponse(), QueryResponse.class);
      }
    
      private  JAXBElement createJaxbElement(T object, Class clazz) {
        return new JAXBElement<>(new QName(clazz.getSimpleName()), clazz, object);
      }
    

提交回复
热议问题