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

	<int:gateway id="gatewayWithHeaderValues" 
				 service-interface="org.springframework.integration.gateway.HeaderEnrichedGatewayTests$SampleGateway">
		<int:method name="sendString" request-channel="channel">
			<int:header name="foo" value="#{stringValueFoo}"/>
			<int:header name="bar" value="bar"/>
		</int:method>
		<int:method name="sendInteger" request-channel="channel">
			<int:header name="foo" value="foo"/>
			<int:header name="bar" value="bar"/>
		</int:method>
		<int:method name="sendStringWithParameterHeaders" request-channel="channel">
			<int:header name="foo" value="foo"/>
			<int:header name="bar" value="bar"/>
		</int:method>
	</int:gateway>

	<int:gateway id="gatewayWithHeaderExpressions" 
				 service-interface="org.springframework.integration.gateway.HeaderEnrichedGatewayTests$SampleGateway">
		<int:method name="sendString" request-channel="channel">
			<int:header name="foo" expression="6 * 7"/>
			<int:header name="bar" expression="'foobar'"/>
		</int:method>
		<int:method name="sendInteger" request-channel="channel">
			<int:header name="foo" expression="42"/>
			<int:header name="bar" expression="@stringValueFoo + @stringValueBar"/>
		</int:method>
		<int:method name="sendStringWithParameterHeaders" request-channel="channel">
			<int:header name="foo" expression="@stringValueFoo.length() + 39"/>
			<int:header name="bar" expression="'foo' + @stringValueBar"/>
		</int:method>
	</int:gateway>
	
	<bean id="stringValueFoo" class="java.lang.String">
		<constructor-arg value="foo"/>
	</bean>

	<bean id="stringValueBar" class="java.lang.String">
		<constructor-arg value="bar"/>
	</bean>
	
	<int:channel id="channel">
		<int:queue/>
	</int:channel>

</beans>
