diff --git a/intermediate/travel/spring-integration-travel-demo/.classpath b/intermediate/travel/spring-integration-travel-demo/.classpath
new file mode 100644
index 00000000..96489ff1
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/.classpath
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/.project b/intermediate/travel/spring-integration-travel-demo/.project
new file mode 100644
index 00000000..2b3bfc4e
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/.project
@@ -0,0 +1,29 @@
+
+
+ travel
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+
+
+
+
+ org.springframework.ide.eclipse.core.springnature
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/.settings/com.springsource.sts.config.flow.prefs b/intermediate/travel/spring-integration-travel-demo/.settings/com.springsource.sts.config.flow.prefs
new file mode 100644
index 00000000..ba514d1f
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/.settings/com.springsource.sts.config.flow.prefs
@@ -0,0 +1,4 @@
+#Thu Sep 30 07:28:41 EDT 2010
+//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/integration\:/travel/src/main/resources/META-INF/spring/integration-context.xml=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
+//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/integration\:/travel/src/main/resources/META-INF/spring/integration-ws-context.xml=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
+eclipse.preferences.version=1
diff --git a/intermediate/travel/spring-integration-travel-demo/.settings/org.eclipse.jdt.core.prefs b/intermediate/travel/spring-integration-travel-demo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..9352ed1f
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,13 @@
+#Sun Aug 15 16:15:17 EDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/intermediate/travel/spring-integration-travel-demo/.settings/org.maven.ide.eclipse.prefs b/intermediate/travel/spring-integration-travel-demo/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000..ae377d5c
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Sun Aug 15 16:14:18 EDT 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/intermediate/travel/spring-integration-travel-demo/.springBeans b/intermediate/travel/spring-integration-travel-demo/.springBeans
new file mode 100644
index 00000000..a388bbfa
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/.springBeans
@@ -0,0 +1,14 @@
+
+
+ 1
+
+
+
+
+
+
+ src/main/resources/META-INF/spring/integration-ws-context.xml
+
+
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/pom.xml b/intermediate/travel/spring-integration-travel-demo/pom.xml
new file mode 100644
index 00000000..2e9fb4cd
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/pom.xml
@@ -0,0 +1,62 @@
+
+ 4.0.0
+ org.springframework.integration.samples
+ travel
+ Spring Integration Travel Services Sample
+ 2.0.0
+
+ 2.0.0.M7
+ 1.2.16
+ 4.7
+ 3.0.4.RELEASE
+
+
+
+ org.springframework.integration
+ spring-integration-core
+ ${spring.integration.version}
+
+
+ org.springframework.integration
+ spring-integration-ws
+ ${spring.integration.version}
+
+
+ org.springframework.integration
+ spring-integration-http
+ ${spring.integration.version}
+
+
+ org.springframework
+ spring-web
+ ${spring.version}
+
+
+ log4j
+ log4j
+ ${log4j.version}
+
+
+
+ junit
+ junit
+ ${junit.version}
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.5
+ 1.5
+ -Xlint:all
+ true
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/intermediate/travel/spring-integration-travel-demo/readme.txt b/intermediate/travel/spring-integration-travel-demo/readme.txt
new file mode 100644
index 00000000..8aa7cb25
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/readme.txt
@@ -0,0 +1,42 @@
+This example demonstrates a simple process that could be useful when building travel related applications;
+It defines two services:
+1. Get Weather report based on the ZIP code
+2. Get Traffic report based on the ZIP code
+
+It uses real services provided by third party providers.
+ Get Weather report Service is a SOAP Web Service
+ Get Traffic report Service is an HTTP Service
+
+This example demonstrates how to configure both:
+ -ÊHTTP Outbound Gateway - to integrate with HTTP Service
+ -ÊWS Outbound Gateway - to integrate with WS Service
+
+
+The diagram below shows the message flow.
+ ÊÊ Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê weatherPreProcessChannel Ê Ê Ê Ê Ê Ê Ê Ê Ê ÊÊweatherChannel Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê weatherServiceChannel
+ ÊÊ Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê |------------------------| -> transformer -> |--------------| -> header-enricher -> |---------------------| -> ws:outbound-gatewayÊ
+ÊÊ Ê |->ÊgetWeatherByZip(zip) Ê Ê routingChannel Ê Ê Ê Ê Ê /
+TravelGateway Ê Ê Ê Ê Ê Ê Ê Ê--> |--------------| -> h-v-r|
+ÊÊ Ê |->ÊgetTrafficByZip(zip) Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê | Ê Ê trafficChannel
+ÊÊ Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê \ |-----------------| -> http:outbound-gateway Ê ÊÊ
+
+Two services are exposed via the Gateway. The gateway enriches the headers of the message with the
+type of request 'weather' or 'traffic' and sends the Message to the 'routingChannel' from which it is retrieved by
+HeaderValueRouter (h-v-r) which routes Message to either 'weatherPreProcessChannel' or 'trafficChannel' based
+on the value of the REQUEST_TYPE header hat was set by the Gateway.
+WS service, requires that the message would be is a certain format. We first need to wrap it into XML request (done by a transformer),
+then we need to add a SOAP Header (done by header-enricher). Once Message was properly formated it is sent to ws:outbound-gateway
+which replies with XML describing real time weather conditions in a particular ZIP code.
+HTTP Service does not require any pre-processing. All we need to do is map HTTP URI variable {zipCode}.
+We do it via element of http:outbound-gateway.
+
+
+
+Here you see we are using Spring Expression Language to bind the value of the payload (zipCode) to this variable.
+
+
+
+
+
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java b/intermediate/travel/spring-integration-travel-demo/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java
new file mode 100644
index 00000000..01ef2512
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java
@@ -0,0 +1,9 @@
+package org.springframework.integration.samples.travel;
+
+public interface TravelGateway {
+
+ public String getWeatherByZip(String zip);
+
+ public String getTrafficByZip(String zip);
+
+}
diff --git a/intermediate/travel/spring-integration-travel-demo/src/main/java/org/springframework/integration/samples/travel/WeatherRequestTransformer.java b/intermediate/travel/spring-integration-travel-demo/src/main/java/org/springframework/integration/samples/travel/WeatherRequestTransformer.java
new file mode 100644
index 00000000..5947c819
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/src/main/java/org/springframework/integration/samples/travel/WeatherRequestTransformer.java
@@ -0,0 +1,10 @@
+package org.springframework.integration.samples.travel;
+
+public class WeatherRequestTransformer {
+
+ public String transform(String zipCode){
+ return "" +
+ " " + zipCode + "" +
+ "";
+ }
+}
diff --git a/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-context.xml b/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-context.xml
new file mode 100644
index 00000000..1e5e585e
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-context.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-http-context.xml b/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-http-context.xml
new file mode 100644
index 00000000..adeeecc0
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-http-context.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-ws-context.xml b/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-ws-context.xml
new file mode 100644
index 00000000..a4da31f0
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/src/main/resources/META-INF/spring/integration-ws-context.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/src/test/java/org/springframework/integration/samples/travel/TravelDemo.java b/intermediate/travel/spring-integration-travel-demo/src/test/java/org/springframework/integration/samples/travel/TravelDemo.java
new file mode 100644
index 00000000..db872049
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/src/test/java/org/springframework/integration/samples/travel/TravelDemo.java
@@ -0,0 +1,45 @@
+package org.springframework.integration.samples.travel;
+
+import java.io.StringWriter;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.log4j.Logger;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.springframework.xml.transform.StringSource;
+
+public class TravelDemo {
+ private static Logger logger = Logger.getLogger(TravelDemo.class);
+ /**
+ * @param args
+ */
+ public static void main(String[] args) throws Exception{
+ ApplicationContext ac = new FileSystemXmlApplicationContext("src/main/resources/META-INF/spring/*.xml");
+ TravelGateway travelGateway = ac.getBean("travelGateway", TravelGateway.class);
+ String weatherReply = travelGateway.getWeatherByZip("10035");
+ logger.info("### Weather: \n" + formatResult(weatherReply));
+
+ String trafficReply = travelGateway.getTrafficByZip("10035");
+ logger.info("### Traffic: \n" + formatResult(trafficReply));
+ }
+
+
+ private static String formatResult(String result) throws Exception{
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", String.valueOf(2));
+ StreamResult streamResult = new StreamResult(new StringWriter());
+ Source source = new StringSource(result);
+ transformer.transform(source, streamResult);
+ String xmlString = streamResult.getWriter().toString();
+ return xmlString;
+ }
+
+}
diff --git a/intermediate/travel/spring-integration-travel-demo/src/test/resources/log4j.xml b/intermediate/travel/spring-integration-travel-demo/src/test/resources/log4j.xml
new file mode 100644
index 00000000..f391e2ed
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/src/test/resources/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/intermediate/travel/spring-integration-travel-demo/target/classes/META-INF/spring/integration-ws-context.xml b/intermediate/travel/spring-integration-travel-demo/target/classes/META-INF/spring/integration-ws-context.xml
new file mode 100644
index 00000000..a4da31f0
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/target/classes/META-INF/spring/integration-ws-context.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/travel/spring-integration-travel-demo/target/classes/org/springframework/integration/samples/travel/TravelGateway.class b/intermediate/travel/spring-integration-travel-demo/target/classes/org/springframework/integration/samples/travel/TravelGateway.class
new file mode 100644
index 00000000..c81ffc3c
Binary files /dev/null and b/intermediate/travel/spring-integration-travel-demo/target/classes/org/springframework/integration/samples/travel/TravelGateway.class differ
diff --git a/intermediate/travel/spring-integration-travel-demo/target/classes/org/springframework/integration/samples/travel/WeatherRequestTransformer.class b/intermediate/travel/spring-integration-travel-demo/target/classes/org/springframework/integration/samples/travel/WeatherRequestTransformer.class
new file mode 100644
index 00000000..6c953fa6
Binary files /dev/null and b/intermediate/travel/spring-integration-travel-demo/target/classes/org/springframework/integration/samples/travel/WeatherRequestTransformer.class differ
diff --git a/intermediate/travel/spring-integration-travel-demo/target/test-classes/log4j.xml b/intermediate/travel/spring-integration-travel-demo/target/test-classes/log4j.xml
new file mode 100644
index 00000000..f391e2ed
--- /dev/null
+++ b/intermediate/travel/spring-integration-travel-demo/target/test-classes/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/intermediate/travel/spring-integration-travel-demo/target/test-classes/org/springframework/integration/samples/travel/TravelDemo.class b/intermediate/travel/spring-integration-travel-demo/target/test-classes/org/springframework/integration/samples/travel/TravelDemo.class
new file mode 100644
index 00000000..b8721049
Binary files /dev/null and b/intermediate/travel/spring-integration-travel-demo/target/test-classes/org/springframework/integration/samples/travel/TravelDemo.class differ