From: Gustavo Martin Morcuende Date: Fri, 15 Jul 2016 19:02:49 +0000 (+0200) Subject: Response objects must be annotated with @XmlRootElement. X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=67cc2bead50db41d512ad30135c27605966aeb9b;p=SpringWebServicesForFun%2F.git Response objects must be annotated with @XmlRootElement. Otherwise you will end up with this error: "No adapter for endPoint" --- 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(