Thanks iwein, I overreacted, on a second try with a standalone project I did not see this behavior with http inbound gateway, the newlines are being correctly preserved, so it looks like it is something specific I am doing in my first project. I am still checking on what could be causing the newline truncation behavior with my first project. One thing I noticed was that the http request explicitly requires a content-type header of text/xml, otherwise it gives the following error:
Code:
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [org.springframework.integration.message.GenericMessage] to required type [java.lang.String]: no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:107)
at org.springframework.beans.SimpleTypeConverter.convertIfNecessary(SimpleTypeConverter.java:47)
... 58 more