Book Image

Getting Started with BizTalk Services

Book Image

Getting Started with BizTalk Services

Overview of this book

Table of Contents (17 chapters)
Getting Started with BizTalk Services
Credits
Foreword
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Custom code in EAI


Now that we understand hybrid connectivity, let's look at one more functionality of bridges, which is to support custom code. Not all capabilities will be available out of the box from BizTalk Services. Customization enables developers to plug in new functionality that augments the existing message flow. For example, we can choose to convert an incoming invoice XML to a user-readable PDF format as well as archive the same for legal reasons.

Customization in a bridge is possible at the stage level, route configuration, or in transforms. Transforms and its customization were covered in Chapter 2, Messages and Transforms. In this section, we will look at bridge customization.

Message inspectors

Message inspectors are custom code hooks for every entry or exit of a stage in a bridge. Custom code must implement the IMessageInspector interface:

public interface IMessageInspector
{
Task Execute(IMessage message, IMessageInspectorContext context);
}

Message inspectors are implemented...