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

	<si:channel id="inputChannel"/>

	<si:channel id="pollableInputChannel">
		<si:queue capacity="10"/>
	</si:channel>

	<si:channel id="outputChannel">
		<si:queue capacity="10"/>
	</si:channel>

	<bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate"/>

	<ws:outbound-gateway id="gatewayWithReplyChannel"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     reply-channel="outputChannel"
	                     reply-timeout="777"
	                     web-service-template="webServiceTemplate"
	                     mapped-request-headers="testRequest"
	                     mapped-reply-headers="testReply"/>

	<ws:outbound-gateway id="gatewayWithIgnoreEmptyResponsesFalseAndRequiresReplyTrue"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     ignore-empty-responses="false"
						 extract-payload="false"
                         requires-reply="true"/>

	<ws:outbound-gateway id="gatewayWithDefaultSourceExtractor"
		                 request-channel="inputChannel"
	                     uri="https://example.org"/>

	<ws:outbound-gateway id="gatewayWithCustomSourceExtractor"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     source-extractor="sourceExtractor"/>

	<ws:outbound-gateway id="gatewayWithCustomRequestCallback"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     request-callback="requestCallback"/>

	<ws:outbound-gateway id="gatewayWithCustomMessageFactory"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     message-factory="messageFactory"/>

	<ws:outbound-gateway id="gatewayWithCustomSourceExtractorAndMessageFactory"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     source-extractor="sourceExtractor"
	                     message-factory="messageFactory"/>

	<ws:outbound-gateway id="gatewayWithCustomFaultMessageResolver"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     fault-message-resolver="faultMessageResolver"/>

	<ws:outbound-gateway id="gatewayWithCustomMessageSender"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     message-senders="messageSender"/>

	<ws:outbound-gateway id="gatewayWithCustomMessageSenderList"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     message-senders="messageSenders"/>

	<ws:outbound-gateway id="gatewayWithCustomInterceptor"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     interceptor="interceptor"/>

	<ws:outbound-gateway id="gatewayWithCustomInterceptorList"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     interceptors="interceptors"/>

	<ws:outbound-gateway id="gatewayWithPoller"
		                 request-channel="pollableInputChannel"
	                     uri="https://example.org">
    	<si:poller fixed-delay="5000"/>
	</ws:outbound-gateway>

	<ws:outbound-gateway id="gatewayWithOrderAndAutoStartupFalse"
	                     request-channel="inputChannel"
	                     uri="https://example.org"
	                     order="99"
	                     auto-startup="false"/>

    <ws:outbound-gateway id="gatewayWithDestinationProvider"
		                 request-channel="inputChannel"
	                     destination-provider="destinationProvider" />

	<bean id="fooAdvice" class="org.springframework.integration.ws.config.WebServiceOutboundGatewayParserTests$FooAdvice"/>

	<ws:outbound-gateway id="gatewayWithAdvice"
		                 request-channel="inputChannel"
	                     destination-provider="destinationProvider">
		<ws:request-handler-advice-chain>
			<ref bean="fooAdvice"/>
		</ws:request-handler-advice-chain>
	</ws:outbound-gateway>

	<si:chain input-channel="gatewayWithAdviceInsideAChain">
		<ws:outbound-gateway destination-provider="destinationProvider">
			<ws:request-handler-advice-chain>
				<ref bean="fooAdvice"/>
			</ws:request-handler-advice-chain>
		</ws:outbound-gateway>
	</si:chain>

	<ws:outbound-gateway id="gatewayWithJmsUri"
	                     request-channel="inputChannel"
						 encoding-mode="NONE"
	                     uri="jms:wsQueue" />

	<bean id="sourceExtractor" class="org.springframework.integration.ws.config.StubSourceExtractor"/>

	<bean id="requestCallback" class="org.springframework.integration.ws.config.StubWebServiceMessageCallback"/>

	<bean id="messageFactory" class="org.springframework.integration.ws.config.StubMessageFactory"/>

	<bean id="faultMessageResolver" class="org.springframework.integration.ws.config.StubFaultMessageResolver"/>

	<bean id="messageSender" class="org.springframework.integration.ws.config.StubMessageSender"/>

	<util:list id="messageSenders">
		<ref bean="messageSender"/>
		<bean class="org.springframework.integration.ws.config.StubMessageSender"/>
	</util:list>

	<bean id="interceptor" class="org.springframework.integration.ws.config.StubClientInterceptor"/>

	<util:list id="interceptors">
		<ref bean="interceptor"/>
		<bean class="org.springframework.integration.ws.config.StubClientInterceptor"/>
	</util:list>

	<bean id="destinationProvider" class="org.springframework.integration.ws.config.StubDestinationProvider"/>

</beans>
