Skip to content

Instantly share code, notes, and snippets.

@ricston-git
Created July 27, 2015 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricston-git/fcb45152b2daab525b2f to your computer and use it in GitHub Desktop.
Save ricston-git/fcb45152b2daab525b2f to your computer and use it in GitHub Desktop.
<response>
<choice>
<when evaluator="groovy" expression="payload instanceof java.util.Collection">
<transformer ref="collectionToStringTransformer"/>
</when>
<otherwise>
<log-component />
</otherwise>
</choice>
<choice>
<when evaluator="groovy" expression="payload.contains('xml')">
<message-properties-transformer>
<add-message-property key="Content-type" value="application/xml"/>
</message-properties-transformer>
</when>
<otherwise>
<message-properties-transformer>
<add-message-property key="Content-type" value="text/plain"/>
</message-properties-transformer>
</otherwise>
</choice>
</response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment