JBoss ESB 4.3 GA

Message Transformation Guide

JBESB-MTG-5/22/08













Legal Notices

The information contained in this documentation is subject to change without notice.

JBoss Inc. makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. JBoss Inc. shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.

Java™ and J2EE is a U.S. trademark of Sun Microsystems, Inc. Microsoft® and Windows NT® are registered trademarks of Microsoft Corporation. Oracle® is a registered U.S. trademark and Oracle9™, Oracle9 Server™ Oracle9 Enterprise Edition™ are trademarks of Oracle Corporation. Unix is used here as a generic term covering all versions of the UNIX® operating system. UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Limited.

Copyright

JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and individual contributors as indicated by the @authors tag. All rights reserved.

See the copyright.txt in the distribution for a full listing of individual contributors. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU General Public License, v. 2.0. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details. You should have received a copy of the GNU General Public License, v. 2.0 along with this distribution; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Software Version

JBoss ESB 4.3 GA

Restricted Rights Legend

Use, duplication, or disclosure is subject to restrictions as set forth in contract subdivision (c)(1)(ii) of the Rights in Technical Data and Computer Software clause 52.227-FAR14.

© Copyright 2008 JBoss Inc.


Contents

Table of Contents

Contents iv


About This Guide 5

What This Guide Contains 5

Audience 5

Prerequisites 5

Organization 5

Documentation Conventions 6

Additional Documentation 7

Contacting Us 7

Introduction 8

Overview 8

Smooks 9

Introduction 9

Samples & Tutorials 9

XSL Transformations 10





About This Guide

    1. What This Guide Contains

A common obstacle encountered during Enterprise Integration is that of bridging the gaps created by the fact that business constructs from different application domains representing the same data are typically represented through different data formats. Bridging this gap is one of the key features of JBoss ESB, as well as the subject of this guide.

      Audience

This guide is most relevant to engineers who are responsible for using JBoss ESB 4.3 GA installations and want to know how it relates to SOA and ESB principles.

      Prerequisites

None.

      Organization

This guide contains the following chapters:

  1. Chapter 1, Overview: An overview of the message transformation solutions provided by JBoss ESB.

  2. Chapter 2, Smooks: Using the Smooks Transformation Management Framework to manage your message transformation logic.

  3. Chapter 3, XSL Transformations: Performing message transformation XSLT.

  4. Chapter 4, Binary Format Transformations: Performing binary format transformations.

      Documentation Conventions

The following conventions are used in this guide:

Convention

Description

Italic

In paragraph text, italic identifies the titles of documents that are being referenced. When used in conjunction with the Code text described below, italics identify a variable that should be replaced by the user with an actual value.

Bold

Emphasizes items of particular importance.

Code

Text that represents programming code.

Function | Function

A path to a function or dialog box within an interface. For example, “Select File | Open.” indicates that you should select the Open function from the File menu.

( ) and |

Parentheses enclose optional items in command syntax. The vertical bar separates syntax items in a list of choices. For example, any of the following three items can be entered in this syntax:

persistPolicy (Never | OnTimer | OnUpdate | NoMoreOftenThan)

Note:



Caution:

A note highlights important supplemental information.

A caution highlights procedures or information that is necessary to avoid damage to equipment, damage to software, loss of data, or invalid test results.

Table 1 Formatting Conventions

      Additional Documentation

In addition to this guide, the following guides are available in the JBoss ESB 4.3 GA documentation set:

  1. JBoss ESB 4.3 GA Trailblazer Guide: Provides guidance for using the trailblazer example.

  2. JBoss ESB 4.3 GA Getting Started Guide: Provides a quick start reference to configuring and using the ESB.

  3. JBoss ESB 4.3 GA Programmers Guide: How to use JBossESB.

  4. JBoss ESB 4.3 GA Release Notes: Information on the differences between this release and previous releases.

  5. JBoss ESB 4.3 GA Administration Guide: How to manage the ESB.

      Contacting Us

Questions or comments about JBoss ESB 4.3 GA should be directed to our support team.



Introduction

    Overview

JBoss ESB supports message data transformation through a number of mechanisms:

  1. Smooks: Smooks is, among other things, a Fragment based Data Transformation and Analysis tool (XML, EID, CSV, Java etc). It supports a wide range of data processing and manipulation features

  2. XSLT: JBoss ESB supports message transformation through the standard XSLT usage model, as well as through the Smooks.

  3. ActionProcessor Data Transformation: Where Smooks can not handle a specific transformation usecase, you can implement a custom transformation solution through implementation of the org.jboss.soa.esb.actions.ActionProcessor interface.

Smooks

    Introduction

Message Transformation on JBossESB is supported by the SmooksAction component. This is an ESB Action component that allows the Smooks Data Transformation/Processing Framework to be plugged into an ESB Action Processing Pipeline.


A wide range of source (XML, CSV, EDI, Java etc) and target (XML, Java, CSV, EDI etc) data formats are supported by the SmooksAction component. A wide range of Transformation Technologies are also supported, all within a single framework. See the Message Action Guide for more details.


      Samples & Tutorials


  1. A number of Transformation Quickstart samples accompany the JBossESB distribution. Check out the "transform_*" Quickstarts1.

  2. A number of tutorials are available online on the Smooks website. Any of these samples can be easily ported to JBossESB.


    XSL Transformations

Following sections illustrate how to create Smooks Resource.

Introduction

In this release of JBossESB, XSL Transformations are supported through Smooks. In later releases we may support XSLT natively. Support for XSLT can be provided by creating a custom org.jboss.soa.esb.actions.ActionProcessor implementation.

1Note that some of the ESB Quickstarts are still using the older “SmooksTransformer” action class. The SmooksAction is a more flexible and easier to use alternative to the SmooksTransformer. The SmooksTransformer will be deprecated in a future release (and removed later again).

JBESB-MTG-5/22/08 4