From 67cc2bead50db41d512ad30135c27605966aeb9b Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Fri, 15 Jul 2016 21:02:49 +0200 Subject: [PATCH] Response objects must be annotated with @XmlRootElement. Otherwise you will end up with this error: "No adapter for endPoint" --- .../de/spring/webservices/endpoints/ExampleEndPoint.java | 12 ++++++++++-- .../de/spring/webservices/endpoints/ExampleEndPoint.java | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/SOAP/cxf/web-services-spring-cxf-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java b/SOAP/cxf/web-services-spring-cxf-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java index e3e8da6..41da49b 100644 --- a/SOAP/cxf/web-services-spring-cxf-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java +++ b/SOAP/cxf/web-services-spring-cxf-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java @@ -33,7 +33,11 @@ public class ExampleEndPoint { this.customBindingExampleService = customBindingExampleService; this.exampleService = exampleService; } - + + // WARNING!!! RESPONSE OBJECT MUST BE ANNOTATED WITH @XmlRootElement + // (ExampleResponse has such annotation) + // OTHERWISE YOU WILL SEE THIS WEIRD ERROR: "No adapter for endPoint" + // see: http://stackoverflow.com/a/22227806 @PayloadRoot(localPart = "ExampleRequest", namespace = NAMESPACE_URI) @ResponsePayload public ExampleResponse exampleResponse( @@ -43,7 +47,11 @@ public class ExampleEndPoint { return this.exampleService.doResponse(request); } - + + // WARNING!!! RESPONSE OBJECT MUST BE ANNOTATED WITH @XmlRootElement + // (ExampleResponse has such annotation) + // OTHERWISE YOU WILL SEE THIS WEIRD ERROR: "No adapter for endPoint" + // see: http://stackoverflow.com/a/22227806 @PayloadRoot(localPart = "CustomBindingExampleRequest", namespace = NAMESPACE_URI) @ResponsePayload public CustomBindingExampleResponse cuntomBindingExampleResponse( diff --git a/SOAP/jaxb2/web-services-spring-jaxb2-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java b/SOAP/jaxb2/web-services-spring-jaxb2-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java index e3e8da6..f6ff022 100644 --- a/SOAP/jaxb2/web-services-spring-jaxb2-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java +++ b/SOAP/jaxb2/web-services-spring-jaxb2-server/src/main/java/de/spring/webservices/endpoints/ExampleEndPoint.java @@ -34,6 +34,10 @@ public class ExampleEndPoint { this.exampleService = exampleService; } + // WARNING!!! RESPONSE OBJECT MUST BE ANNOTATED WITH @XmlRootElement + // (ExampleResponse has such annotation) + // OTHERWISE YOU WILL SEE THIS WEIRD ERROR: "No adapter for endPoint" + // see: http://stackoverflow.com/a/22227806 @PayloadRoot(localPart = "ExampleRequest", namespace = NAMESPACE_URI) @ResponsePayload public ExampleResponse exampleResponse( @@ -44,6 +48,10 @@ public class ExampleEndPoint { return this.exampleService.doResponse(request); } + // WARNING!!! RESPONSE OBJECT MUST BE ANNOTATED WITH @XmlRootElement + // (CustomBindingExampleResponse has such annotation) + // OTHERWISE YOU WILL SEE THIS WEIRD ERROR: "No adapter for endPoint" + // see: http://stackoverflow.com/a/22227806 @PayloadRoot(localPart = "CustomBindingExampleRequest", namespace = NAMESPACE_URI) @ResponsePayload public CustomBindingExampleResponse cuntomBindingExampleResponse( -- 2.1.4