Integration Engine Solutions to Connect Anything to Anything

Log out?

eiConsole v.24R1
Tutorial & Interface

eiConsole – Data Mapping & Transformation

Using Java Call-Outs

Note: The Quick Start, Foundation, and Topology tutorials should be completed before proceeding with the Data Mapping & Transformation Tutorials.


Overview

This Interface and its accompanying tutorial demonstrate how to use the Data Mapper in Route configurations to convert between different XML Formats. This transformation involves a Java method call-out to generate a unique ID.

We will use the “Java Call-Out” feature of the Data Mapper to invoke Java methods. This tutorial expands on concepts covered in the tutorial Data Mapping – Using Functions, so users are expected to be familiar with that content.


Before You Begin

Zip File IconUsing Java Call-Outs
Working Directory

Download the Using-Java-Call-Outs-Working-Directory.zip file with the sample Working Directory and unzip it on your computer to a convenient place. In our case, it’s c:\Users\{USER _NAME}\PilotFish eiConsole Working Directories\Using Java Call-Outs where {USER_NAME} is the user’s name.

Open the eiConsole, browse to your Using Java Call-Outs directory and open it. The fully configured Data Mapping – Using Java Call-Outs route is included in the Working Directory. Your Route File Management screen will open, as shown below. Next, follow the tutorial and walk through it step-by-step.


Double-click on the Data Mapping – Using Java Call-Outs route.


Creating & Configuring a New Format

Start by creating and configuring a new format. Name it “PeopleA XML to PeopleF XML“.


Uncheck Use Direct Relay checkbox and click the New button to open the Data Mapper.


Then, select XML from the Format Reader and read “PeopleA.xml” as the Source. You can find it in c:\Users\{USER _NAME}\PilotFish eiConsole Working Directories\Using Java Call-Outs\data. The “PeopleF.xml” is also in this directory.


Click the Read Format button.


Then read the “PeopleF.xml” as the Target, again selecting XML from the Format Reader.


Click the Read Format button.


Now your Data Mapper should look like the screen below.


Mapping Exercise

Repeat the mapping exercise from the previous tutorial or copy the XSLT using the XSLT View tab:


Modifying Values

For this tutorial, we’ll really just be making a single modification. The SSN field represents an identifier for a given Person. Rather than using this value, suppose we wanted to use a GUID instead. While you could conceivably do this in standard XSLT, the means of accomplishing this are probably well outside reasonable time constraints. For facilitating operations of this nature, calling out to the library of Java classes and methods is usually a better use of time.

Select the Custom tab, then the Uncategorized sub-tab. You should see Java Extension as an option:


Drag & drop this item onto the SSN field in the mapping panel. This will raise a dialog querying you for a Java call string and the number of arguments:

For our call string, enter java.util.UUID for the Java Class Name and randomUUID for the Java Method Call.

You do not need an ending set of parentheses, as the arguments count will provide them automatically. Now your mapping should look like the screen below.


Testing the Mapping

Go to the Testing tab…


…and click the Green arrow to begin the testing.


XSLT and XPath provide numerous other functions, all of which are available in the tool palette at the top of the Data Mapper screen. Click on the View Results button for a more convenient way to check the results.  You should see a UUID / GUID in the SSN field.


You can use this mechanism to call any Java class or method available in the eiConsole or eiPlatform. This includes the standard Java runtime classes as well as quite a few commonly used libraries. Java call-outs are used for date formatting, database look-ups, saving and loading of files and other utility functions.


This is a unique website which will require a more modern browser to work! Please upgrade today!