Book Image

Spring Integration Essentials

By : CHANDAN K PANDEY
Book Image

Spring Integration Essentials

By: CHANDAN K PANDEY

Overview of this book

Table of Contents (18 chapters)
Spring Integration Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. Message Transformers

The takeaway from the last chapter was that the message endpoints make the handshake transparent and seamless between two heterogeneous components. In this chapter, we will get into the details of one of the important concerns in integration—transformation of messages so that they can be consumed across a chain. We will cover:

  • Message transformers

  • Working with XML payload

  • Enrichers

  • Claim check

The same set of data can be viewed by different systems in different contexts, for example, an employee record is used by the reporting system as well as the finance system. However, the usage of the object will be different. Reporting systems just dump the employee record—so even if it gets it as a single string, it's okay. On the other hand, payroll systems might need to send mail notifications, calculate taxes based on state and country, and to carry out other functions for which employee data must be presented as a POJO, with information in a separate field, say, name...