Try this...
Code:
<jdbc:outbound-channel-adapter data-source="dataSource" channel="outboundJdbcChannelOne"
query="insert into MESSAGES (MESSAGE_ID,PAYLOAD) values (:id,:payload)"
sql-parameter-source-factory="spelSource"/>
<bean id="spelSource" class="org.springframework.integration.jdbc.ExpressionEvaluatingSqlParameterSourceFactory">
<property name="parameterExpressions">
<map>
<entry key="id" value="headers['id'].toString()"/>
<entry key="payload" value="payload"/>
</map>
</property>
</bean>
The parameter names in the SQL map to expressions in the parameter source factory.
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware