Introduction
In this chapter, we will be looking at a few of the ways that Camel allows you to transform or change the content of messages being processed. The book Enterprise Integration Patterns by Gregor Hohpe and Bobby Woolf defines the responsibility of translating data from one format to another within the Message Translator pattern (http://www.enterpriseintegrationpatterns.com/MessageTranslator.html). This is what Camel has based its transformation capabilities on.
In this chapter we will explore a number of ways in which Camel performs message content transformation:
Using the
transform
statement. This allows you to reference Camel Expression Language code within the route to do message transformations.Calling a templating component, such as Camel's XSLT or Velocity template style components. This will typically reference an external template resource that is used in transforming your message.
Calling a Java method (for example,
beanref
), defined by you, within a Camel route to perform...