SWIFT Integration Projects

Using Message Validation Features

This section explains how to use specialized message validation features and Projects available with the SWIFT OTD Library.

Basic Validation Features

The SWIFT OTD Library accomplishes validation operations via Java-based Collaboration Definitions packaged with the library. These Collaboration Definitions have the following validation features provided to enhance their use:

These validation features share the following use characteristics:

Installing the OTD library allows eGate and any eWay you use with the library to provide full support for these features. The rest of this section provides a summary of how these features operate with the SWIFT OTD Library.

Validation Components

In addition to components described under Basic Validation Features, the SWIFT OTD Library also contains the following basic components:

Validation Methods

The SWIFT OTD Library now provides two additional OTD API methods, validate() and validateMFVR(), that can be invoked by a Collaboration to validate SWIFT 2003, 2005, 2006, 2007 and 2008 OTDs directly in the Collaboration. (see In Collaboration Validation Methods). This is an alternative to using the Validation Collaboration Definitions.

Validation Collaboration Definitions

Validation Collaboration Definitions are provided for many key SWIFT message types. These Collaboration Definitions, when combined with eGate Services, become Java-based Collaborations that verify the syntax of the SWIFT messages.

This verification is done by parsing the data into a structure that conforms to the SWIFT standard specifications. The validation functions use these Collaborations to access specific data that is then verified according the algorithms of the MFVR specifications.

For lists of these Collaboration Definitions, see Message Validation Rules.

Validation Operation

You can combine the library’s validation features in any way desired, to meet your specific needs. The SWIFT OTD Library packages a prebuilt implementation that takes SWIFT messages from a JMS Queue or Topic and validates them individually, then writes the results to a specified JMS Queue or Topic. One set contains valid messages, and the other contains the invalid ones, along with messages indicating the errors generated.

Validation Project examples

The validation Collaboration Definitions are part of the OTD Library and packaged with validation Project examples you can import into eGate.

Basic validation steps

Each validation Collaboration Definition has only the applicable tests for a specific OTD/message type, but they all operate according to the same general format, as follows:

For an explanation of using these Collaboration Definitions and the validation Project examples, see SWIFT Projects.

Library Methods

The SWIFT OTD Library provides a set of run-time methods that allow you to manipulate OTD data in a variety of ways. The following methods are the most frequently used with validation operations:

In addition, the library has methods that allow you to perform basic but necessary operations with the OTDs. See Table 11.

Table 11 Basic OTD Methods

Method 

Description 

add()

Adds a repetition to a given child node. 

append()

Adds given data at the end of existing data. 

copy()

Copies given data at a specified point. 

count()

Gives the count of node repetitions. 

delete()

Erases data at a specified point. 

get()

Retrieves data from a node. 

has()

Checks whether a specified child node is present. 

insert()

Inserts given data at a specified point. 

length()

Returns the length of data contained in an object. 

marshal()

Serializes internal data into an output stream. 

remove()

Removes a given child node repetition. 

reset()

Clears out any data held by an OTD. 

size()

Returns the current number of repetitions for the current child node. 

unmarshal()

Parses given input data into an internal data tree. 

To help in your use of the SWIFT OTD Library and its features, the library includes a Javadoc. You can see this document for complete details on all of these methods. See Table 13 for more information on this document and how to use it.