<?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:si="http://www.springframework.org/schema/integration"
	   xmlns:ws="http://www.springframework.org/schema/integration/ws"
	   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
			http://www.springframework.org/schema/integration/ws
			https://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd">

	<si:message-history/>

	<ws:inbound-gateway id="simple"
						request-channel="requestsVerySimple"
						error-channel="customErrorChannel"
						auto-startup="false"
						phase="101"/>

	<si:channel id="customErrorChannel"/>

	<si:channel id="requestsVerySimple"/>

	<ws:inbound-gateway id="extractsPayload"
						request-channel="requestsSimple"
						extract-payload="false"
						reply-timeout="0"/>

	<ws:inbound-gateway id="marshalling"
						request-channel="requestsMarshalling"
						error-channel="customErrorChannel"
						marshaller="marshaller"
						mapped-request-headers="testRequest"
						mapped-reply-headers="testReply"
						reply-timeout="0"/>

	<si:channel id="requestsMarshalling">
		<si:queue/>
	</si:channel>

	<si:channel id="requestsSimple">
		<si:queue/>
	</si:channel>

	<si:channel id="headerMappingRequests">
		<si:queue/>
	</si:channel>

	<ws:inbound-gateway id="headerMappingGateway" request-channel="headerMappingRequests"
						header-mapper="testHeaderMapper"/>

	<bean id="marshaller" class="org.mockito.Mockito" factory-method="mock">
		<constructor-arg value="org.springframework.oxm.support.AbstractMarshaller" type="java.lang.Class"/>
	</bean>

	<bean id="testHeaderMapper"
		  class="org.springframework.integration.ws.config.WebServiceInboundGatewayParserTests$TestHeaderMapper"/>

	<si:channel id="replyTimeoutRequests">
		<si:queue/>
	</si:channel>

	<ws:inbound-gateway id="replyTimeoutGateway" request-channel="replyTimeoutRequests"
						reply-timeout="1234"/>

</beans>
