<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:int-http="http://www.springframework.org/schema/integration/http"
	xsi:schemaLocation="http://www.springframework.org/schema/integration/http https://www.springframework.org/schema/integration/http/spring-integration-http.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

	<int:channel id="ch1" />

	<int-http:outbound-gateway url="http://localhost:18080/it/" request-channel="ch1" reply-channel="ch2"
		transfer-cookies="true"
		request-factory="requestFactory"
	/>

	<bean id="requestFactory" class="org.springframework.integration.http.outbound.CookieTests$RequestFactory" />

	<int:transformer input-channel="ch2" output-channel="ch3" expression="'Hello, again!'" />

	<int-http:outbound-gateway url="http://localhost:18080/it/" request-channel="ch3" reply-channel="ch4"
		transfer-cookies="true"
		request-factory="requestFactory"
	/>

	<int:transformer input-channel="ch4" output-channel="ch5" expression="'Hello, once more!'" />

	<int-http:outbound-gateway url="http://localhost:18080/it/" request-channel="ch5" reply-channel="ch6"
		transfer-cookies="true"
		request-factory="requestFactory"
	/>

	<int:channel id="ch6">
		<int:queue/>
	</int:channel>

</beans>
