JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS SWIFT Message Library User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

SWIFT Message Library

Overview of SWIFT Message Libraries

Library Versions and Access

Installing the SWIFT Message Library

Increasing the Heap Size

To Increase the Heap Size for GlassFish

To Increase the Heap Size for NetBeans

Using the SWIFT Message Library

SWIFT Message Type OTDs

SWIFT Message Structure

Message Library and Collaboration Locations in NetBeans

SWIFT Message Type Reference

Category 1 Messages

Category 2 Messages

Category 3 Messages

Category 4 Messages

Category 5 Messages

Category 6 Messages

Category 7 Messages

Category 8 Messages

Category 9 Messages

Validation Collaborations

SWIFT Generic Library

SWIFT Message Library JAR Files

Using Message Validation Features

Basic Validation Features

Validation Components

Validation Methods

Validation Collaboration Definitions

Validation Operation

Basic validation steps

Library Methods

Message Validation Rules

Message Format Validation Rules (MFVR)

MFVR Validation Methods

MFVR Errors

In Collaboration Validation Methods

validate()

Description

Syntax

Parameters

Return Values

Throws

validateMFVR()

Description

Syntax

Parameters

Return Values

Throws

validateMPR()

Description

Syntax

Parameters

Return Values

Throws

Calling the Validation Methods in your Collaboration

SWIFT Projects

Importing a Sample Project

To Import a Sample Project

SWIFT Projects and NetBeans

About the SWIFT MX Validation Sample

Sample Project

Descriptions of components

Running the MX Sample Project

SWIFT Correlation Repository Sample

Prerequisites

Installation steps

Preparing an SCR flow

Designing an SCR flow

Linking the Domain Name and Direction to a Color

Using the SCR for Monitoring Flows

Using the Viewer for Monitoring Transactions

Using the SCR as Gatekeeper

Using the Viewer to Repair Messages

Updating BICDirService

Source of Information

Update Operation

BICDirService Method Operation

Lookup Method Definitions

Validation Method Definitions

BICDir Exceptions

Error message framework

Error Message General Form

Updating BICPlusIBAN

To Update BICPlusBAN Information

BICPlusIBAN Validation Method Definitions

Error Message Information

Error Messages

Setting the Debug Level

Message Examples

Parse Debug Level Message Example

Using SWIFT FIN-Based Funds OTDs

SWIFT Message Library Funds Features

Using SWIFT Message Library Java Classes

Relation to OTD Message Types

SWIFT Message Library Javadoc

OTD Library Java Classes

Error Message Information

This section explains the SWIFT Message Library validation error files and messages.

Error Messages

There are separate error messages and reporting mechanisms for each type of validation performed by a Service. You can control the amount of debugging information in the error messages you receive by using the debug flags as parameters when you call the command() method. The library’s error parser provides the following debug levels:

Error message file output appears at the end of any message that generates an error.

Setting the Debug Level

The available debug level flags are:

Using the Debug Level flags, you can configure the debugging information you receive by setting the appropriate debug parameter in the OTD’s command() method. For example, to set the error message level to the Regular Information level (I flag), with abbreviations turned on (A flag), you would set command() with the parameters A and I. You can do this from the Collaboration Editor’s Business Rules Designer as displayed below.

Figure 1 Setting the debug level using the Business Rules Designer

image:Setting the Debug Level

This produces the following Java code (this example uses the mt_202 Validation Collaboration:

     mt_202_1.command( "AI" );

Calling command() enables any of the debug functions presented as a parameter. For more information, see the SWIFT Message Library Javadoc.

Message Examples

An example of a regular information-level parse error (cannot find a required field) is:

at 0: com.stc.swift.runtime.SwiftUnmarshalException: mt_103.Mt_103: 0:
 Failed to parse required child(Data).

An example of a parse error with the debug level enabled (cannot find a required field) is:

at 146: null: com.stc.swift.runtime.SwiftUnmarshalException:
 mt_543.Mt_543.Data.GeneralInformation.FunctionOfTheMessage: 146:
 Failed to parse required child(String2).

Given this path to the data, you can determine where in the message the parser failed by looking at:

See MFVR Errors for MFVR-specific error information. For more detailed error information, see Error Message Information.

Parse Debug Level Message Example

The following example shows error message output at the parse debug level:

[main] PARSE - Swift: matchDelimSkip("{1:") --> true.
[main] PARSE - Swift: getData("F|A|L") --> "F".
[main] DEBUG - Swift: mt_502.Mt_502.BasicHeader.AppIdentifier: 3: Mapped data("F").
[main] DEBUG - Swift: mt_502.Mt_502.BasicHeader.AppIdentifier: 3: Mapped rep[0].
[main] PARSE - Swift: getData(charSet, 2, 2) --> "01".
[main] DEBUG - Swift: mt_502.Mt_502.BasicHeader.ServiceIdentifier: 4:
 The following is the last field successfully parsed the 4th 22a:
[main] PARSE - Swift: matchDelimSkip("22H::") --> true.
[main] PARSE - Swift: getData(charSet, 4, 4) --> "PAYM".
[main] DEBUG - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator.IndicatorH.String3:
 218: Mapped data("PAYM").
[main] PARSE - Swift: matchDelimSkip("//") --> true.
[main] DEBUG - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator.IndicatorH.String3:
 218: Mapped rep[0].
[main] PARSE - Swift: getData(charSet, 4, 4) --> "APMT".
[main] DEBUG - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator.IndicatorH.String5:
 224: Mapped data("APMT").
[main] DEBUG - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator.IndicatorH.String5:
 224: Mapped rep[0].
[main] PARSE - Swift: matchDelimSkip("
:") --> true.
[main] DEBUG - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator.IndicatorH: 213:
 Mapped rep[0].

The message goes on for several more lines, not indicating any error. Then the parser is looking for any more 22a’s, F or H, and does not find one. See the following example:

[main] DEBUG - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator[3]: 159: Mapped rep[3].
[main] PARSE - Swift: matchDelimSkip("22F::") --> false.
[main] PARSE - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator.IndicatorF: 231:
 Failed to find BeginDelimiter("22F::").
[main] PARSE - Swift: matchDelimSkip("22H::") --> false.
[main] PARSE - Swift: mt_502.Mt_502.Data.OrderDetails.Indicator.IndicatorH: 231:
 Failed to find BeginDelimiter("22H::").

The parser then looks for a 98a either option A|B|C as follows:

[main] PARSE - Swift: matchDelimSkip("98A::") --> false.
[main] PARSE - Swift: mt_502.Mt_502.Data.OrderDetails.DateTime[0].DateTimeA: 231:
 Failed to find BeginDelimiter("98A::").
[main] PARSE - Swift: matchDelimSkip("98B::") --> false.
[main] PARSE - Swift: mt_502.Mt_502.Data.OrderDetails.DateTime[0].DateTimeB: 231:
 Failed to find BeginDelimiter("98B::").
[main] PARSE - Swift: matchDelimSkip("98C::") --> false.
[main] PARSE - Swift: mt_502.Mt_502.Data.OrderDetails.DateTime[0].DateTimeC: 231:
 Failed to find BeginDelimiter("98C::").

The parser finds no repetitions, which does not fit in the required range of 1 to 3 as described in the following example, so at this point, the parser fails, because no expected repetitions were found:

[main] PARSE - Swift: mt_502.Mt_502.Data.OrderDetails: 231:
 Failed to match minimum repititions[ 1 < 0 <= 3 ].

[main] PARSE - Swift: mt_502.Mt_502.Data.OrderDetails:
145: Failed to parse
 required child(DateTime).
[main] PARSE - Swift: mt_502.Mt_502.Data:
145: Failed to match minimum
 repititions[ 1 < 0 <= 1 ].
[main] PARSE - Swift: mt_502.Mt_502.Data:
73: Failed to parse required
 child(OrderDetails).
[main] PARSE - Swift: mt_502.Mt_502: 
67: Failed to match minimum repititions[ 1 < 0 <= 1 ].
[main] PARSE - Swift: mt_502.Mt_502: 
0: Failed to parse required child(Data).
 [main] LAST  - Swift: Last match: mt_502.Mt_502.
Exception in thread "main" at 0: null: com.stc.
swift.runtime.SwiftUnmarshalException:
 mt_502.Mt_502: 0: Failed to parse required child(Data).
    at com.stc.swift.runtime.SwiftOtdRep.
throwExcept(SwiftOtdRep.java:1977)
    at com.stc.swift.runtime.SwiftOtdRep.
parseChildren(SwiftOtdRep.java:1577)
    at com.stc.swift.runtime.SwiftOtdRep.
parse(SwiftOtdRep.java:1486)
    at com.stc.swift.runtime.SwiftOtdRep.
unmarshal(SwiftOtdRep.java:1339)