concept message transformation in category esb

appears as: message trsformations, message trsformation, message trsformation
Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix

This is an excerpt from Manning's book Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix.

Besides the support for a set of transport protocols, implementing the integration between a service consumer and a service provider often requires a transformation of the message format. In the example shown in figure 1.8, the content of the JMS message can’t be forwarded as is to the legacy application. There is a need for logic that transforms the message format to the expected format of the service provider. The ESB core functionality that helps with changing the message format is known as the message transformation functionality.

A common technology to transform a message from the source to the target format is Extensible Stylesheet Language Transformation (XSLT). XSLT is a World Wide Web Consortium (W3C) recommendation widely adopted in the integration industry, which ensures that message transformations written in XSLT are usable in most of the ESBs available in the market. Before the age of open standards like XSLT and the use of ESBs, the EAI products, often referred to as brokers, implemented message transformation most often with proprietary technology. So message transformation is a good example of the evolution of open standards used in integration products. Let’s take a look at a graphical representation of message transformation as a core functionality of an ESB in figure 1.9.

Figure 1.9. An ESB provides the capability to transform the message format of an incoming message to the format expected by the target application. In this example the ESB transforms the SOAP message to an EDI message by using a message transformer.

Message transformation, as shown in figure 1.9, is one of the most used capabilities in ESBs. It’s rare that the message format of an incoming message exactly matches the format expected by the target application. The example used in figure 1.9 shows a transformation from a SOAP message to an electronic data interchange (EDI) message. The message transformer that performs the message transformation can be implemented with an XSLT style sheet as we already mentioned, but it can also be a transformation tool from a third party that’s dedicated to supporting all kinds of EDI-related transformations. Alternatively, you can write your own with the application programming interface (API) provided with your ESB product. In chapter 5, we explore how message transformation can be implemented with a number of examples.

We already mentioned transformation a few times in this chapter introduction. Transforming the format of messages is common in integration solutions. In section 5.3, we look at message transformation in detail. With XSLT as the open standard for XML message transformation, we’ll see how it can be used in a Mule and ServiceMix message flow.

The default transformers are provided by Mule to make it easier for Mule users to deal with various transport types. This isn’t the type of transformer that we want to discuss in relation to message transformation, however. With message transformation, the message format is actually changed, and this isn’t what happens with the transport transformers. Why discuss the previous JMS example, then? Well, the transformer architecture in Mule is based on this type of transformer, including the message transformation support. The XsltTransformer class that we use in the next example must also be configured in the transformer element, and therefore the default transformers are overridden. So you should know the concept of default transformers before using the XsltTransformer. Now let’s take a look at an example of message transformation in Mule.