<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:stream="http://www.springframework.org/schema/integration/stream"
	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/stream
			https://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
			http://www.springframework.org/schema/integration/ws
			https://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd">

	<!-- This chain receives from the 'fahrenheitChannel' and enriches the request Message by adding
	     the "soap-action" header value. Then, the Web Service outbound Messaging Gateway invokes the
	     Web Service for the given URI, and the reply Message is sent to the 'celsiusChannel'. -->
	<chain input-channel="fahrenheitChannel" output-channel="celsiusChannel">
		<ws:header-enricher>
			<ws:soap-action value="https://www.w3schools.com/xml/FahrenheitToCelsius"/>
		</ws:header-enricher>
		<ws:outbound-gateway uri="https://www.w3schools.com/xml/tempconvert.asmx"/>
	</chain>

	<!-- The response from the service is logged to the console. -->
	<stream:stdout-channel-adapter id="celsiusChannel"/>

</beans:beans>
