1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.transport;
18
19 import javax.xml.transform.Transformer;
20
21 import org.springframework.util.Assert;
22 import org.springframework.ws.context.MessageContext;
23 import org.springframework.xml.transform.TransformerObjectSupport;
24
25 public class SimpleTestingMessageReceiver extends TransformerObjectSupport implements WebServiceMessageReceiver {
26
27 public void receive(MessageContext messageContext) throws Exception {
28 Assert.notNull(messageContext, "MessageContext is null");
29 logger.info("Received " + messageContext.getRequest());
30 Transformer transformer = createTransformer();
31 transformer.transform(messageContext.getRequest().getPayloadSource(),
32 messageContext.getResponse().getPayloadResult());
33 }
34 }