Book Image

Spring Integration Essentials

By : CHANDAN K PANDEY
Book Image

Spring Integration Essentials

By: CHANDAN K PANDEY

Overview of this book

This book is intended for developers who are either already involved with enterprise integration or planning to venture into the domain. Basic knowledge of Java and Spring is expected. For newer users, this book can be used to understand an integration scenario, what the challenges are, and how Spring Integration can be used to solve it. Prior experience of Spring Integration is not expected as this book will walk you through all the code examples.
Table of Contents (12 chapters)
11
Index

Working with XML payload

Two disparate systems might agree to interact via XML formats. This means that whenever there is an outgoing communication, the system's data structure needs to be converted to XML; while in the case of incoming messages, it needs to be converted to a data structure understood by the system. How do we do this? Spring provides first-class support to deal with XML via its OXM (Object-to-XML) framework. Marshalling and unmarshalling is done by classes—org.springframework.oxm.Marshaller and org.springframework.oxm.Unmarshaller, respectively. Marshaller converts an Object to an XML stream, while unmarshaller converts an XML stream to Object. Spring's Object/XML Mapping support provides several implementations supporting marshalling and unmarshalling using JAXB, Castor, and JiBX among others. Spring Integration abstracts it further and provides many out-of-the-box components, which help to deal with the XML payload. A few of them are marshalling transformer...