<?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:jdbc="http://www.springframework.org/schema/jdbc"
	   xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc"
	   xmlns:int="http://www.springframework.org/schema/integration"
	   xsi:schemaLocation="http://www.springframework.org/schema/jdbc https://www.springframework.org/schema/jdbc/spring-jdbc.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/jdbc https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

	<int:channel id="target"/>

	<jdbc:embedded-database id="dataSource" type="HSQL"/>

	<int-jdbc:stored-proc-outbound-channel-adapter id="storedProcedureOutboundChannelAdapter"
												   data-source="dataSource" channel="target"
												   stored-procedure-name="testProcedure1">
		<int-jdbc:sql-parameter-definition name="username" direction="IN" type="VARCHAR"/>
		<int-jdbc:sql-parameter-definition name="password" direction="OUT"/>
		<int-jdbc:sql-parameter-definition name="age" direction="INOUT" type="INTEGER" scale="5"/>
		<int-jdbc:sql-parameter-definition name="description"/>
		<int-jdbc:parameter name="username" value="kenny" type="java.lang.String"/>
		<int-jdbc:parameter name="description" value="Who killed Kenny?"/>
		<int-jdbc:parameter name="password" expression="payload.username"/>
		<int-jdbc:parameter name="age" value="30" type="java.lang.Integer"/>
	</int-jdbc:stored-proc-outbound-channel-adapter>

</beans>
