<?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="gatewayA" 
	             service-interface="org.springframework.integration.gateway.MultipleEndpointGatewayTests$SampleGateway"
	             default-request-channel="routingChannel"/>
	
	<int:gateway id="gatewayB" 
	             service-interface="org.springframework.integration.gateway.MultipleEndpointGatewayTests$SampleGateway"
	             default-request-channel="routingChannel"
	             default-reply-channel="outputChannel"/>
	             
	<int:publish-subscribe-channel id="outputChannel"/>   
	             
	<int:router input-channel="routingChannel" expression="payload"/>
	
	<!-- gatewayNoDefaultReplyChannel -->
	<int:service-activator input-channel="echoAsMessageChannel" output-channel="echoAsMessageChannelA" ref="service" method="echoAsMessage"/>	
	<int:service-activator input-channel="echoAsMessageChannelA" ref="service" method="echoAsMessage"/>
	<!-- gatewayWithDefaultReplyChannel -->
	<int:service-activator input-channel="echoAsMessageChannelIgnoreDefOutChannel" output-channel="echoAsMessageChannelIgnoreDefOutChannelB" ref="service" method="echoAsMessage"/>
	<int:service-activator input-channel="echoAsMessageChannelIgnoreDefOutChannelB" ref="service" method="echoAsMessage"/>
	<!-- gatewayWithReplySentBackToDefaultReplyChannel -->
	<int:service-activator input-channel="echoAsMessageChannelDefaultOutputChannel" output-channel="echoAsMessageChannelDefaultOutputChannelB" ref="service" method="echoAsMessage"/>
	<int:service-activator input-channel="echoAsMessageChannelDefaultOutputChannelB" output-channel="outputChannel" ref="service" method="echoAsMessage"/>
	
	
	<bean id="service" class="org.springframework.integration.gateway.MultipleEndpointGatewayTests$SampleEchoService"/>
	
</beans>
