From 951a5dbb42774789b9d31647079db909f0de93b3 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Mon, 1 Mar 2010 21:19:49 +0000 Subject: [PATCH] INT-994 SimpleEchoResponder now echos the same text as provided in the request, and the servlet loads on startup. --- .../integration/samples/ws/SimpleEchoResponder.java | 9 ++++++--- .../ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java b/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java index e5f383283a..13c5bfb933 100644 --- a/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java +++ b/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java @@ -16,13 +16,16 @@ package org.springframework.integration.samples.ws; +import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import org.springframework.integration.xml.source.DomSourceFactory; public class SimpleEchoResponder { - public DOMSource issueResponseFor(Object request) { - return (DOMSource) new DomSourceFactory().createSource( - "hello"); + + public Source issueResponseFor(DOMSource request) { + return new DomSourceFactory().createSource( + "" + + request.getNode().getTextContent() + ""); } } diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml b/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml index fdb72cf724..e732138554 100644 --- a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml +++ b/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml @@ -9,6 +9,7 @@ contextConfigLocation WEB-INF/spring-ws-config.xml + 1