1 package de.spring.webservices.endpoints;
3 import org.jdom2.Element;
4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.ws.context.MessageContext;
6 import org.springframework.ws.server.endpoint.annotation.Endpoint;
7 import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
8 import org.springframework.ws.server.endpoint.annotation.RequestPayload;
9 import org.springframework.ws.server.endpoint.annotation.ResponsePayload;
11 import de.spring.webservices.auto.CustomBindingExampleRequest;
12 import de.spring.webservices.auto.CustomBindingExampleResponse;
13 import de.spring.webservices.auto.ExampleRequest;
14 import de.spring.webservices.auto.ExampleResponse;
15 import de.spring.webservices.operations.Operations;
16 import de.spring.webservices.operations.Operations.RequestResponse;
17 import de.spring.webservices.services.ExampleService;
21 public class ExampleEndPoint {
22 private static final String NAMESPACE_URI = "http://gumartinm.name/spring-ws/example";
24 private final Operations.RequestResponse
25 <CustomBindingExampleResponse, CustomBindingExampleRequest> customBindingExampleService;
27 private final ExampleService exampleService;
30 public ExampleEndPoint(
31 RequestResponse<CustomBindingExampleResponse, CustomBindingExampleRequest> customBindingExampleService,
32 ExampleService exampleService) {
33 this.customBindingExampleService = customBindingExampleService;
34 this.exampleService = exampleService;
37 @PayloadRoot(localPart = "ExampleRequest", namespace = NAMESPACE_URI)
39 public ExampleResponse exampleResponse(
40 @RequestPayload final ExampleRequest request,
41 @RequestPayload final Element element,
42 final MessageContext messageContext) {
44 return this.exampleService.doResponse(request);
47 @PayloadRoot(localPart = "CustomBindingExampleRequest", namespace = NAMESPACE_URI)
49 public CustomBindingExampleResponse cuntomBindingExampleResponse(
50 @RequestPayload final CustomBindingExampleRequest requestObject,
51 @RequestPayload final Element element,
52 final MessageContext messageContext) {
54 return this.customBindingExampleService.requestResponse(requestObject);