About the ISO8583 sample

The International Standards Organization (ISO) defines and publishes data standards that are used by many companies in both the public and private sectors. A commonly-used ISO standard for the banking and financial services sector is ISO8583, which specifies a message format describing credit card and debit card data that is exchanged between devices and card issuers. The standard is typically used by point-of-sale devices and automated teller machines. The messages themselves commonly contain information about the value of a transaction, where it originated, the card account number, and bank sort code. The applications that data is sent to can have a variety of purposes, such as transferring funds between bank accounts, paying bills, or purchasing mobile phone credit. WebSphere Message Broker can help in these kinds of middleware scenarios by enabling the transformation of data between the ISO8583 standard and more convenient formats such as XML, and via other protocols such as WebSphere MQ, FTP, or HTTP.

The following diagram shows the layout of an ISO8583 message:

1. Custom header(s); 2. MTI; 3. Primary Bitmap; 4. Secondary bitmap (optional); 5. Message data fields (optional - which ones present depends on earlier bitmaps).

ISO8583 messages can be preceded by a customised (often proprietary) header, but the core layout always contains the following sections:

This sample provides a Message Broker library, ISO8583Library, which defines the fields which make up each of the above sections. To investigate the details of this message model, please import the sample into your workspace. A screen shot showing part of the model is provided below, followed by a summary of its field and data type implementation:

ISO8583 DFDL Model

Message Type Indicator Fields

The combination of the four MTI fields specify the kind of interchange message which is being transmitted. Commonly, applications will use the MTI to determine whether the message requires a response, and the format such a response should take (ie which values should be carried in the MTI and which Message Data fields should be present). This decision is typically made by the application which Message Broker sends the ISO8583 data to, so this sample passes through the fields without applying any further validation or transformation of their content.

Primary Bitmap and Secondary Bitmap

The Primary Bitmap and Secondary Bitmap are defined in the DFDL model using an embedded Group which contains a complex element representing each bitmap. The complex element representing the Primary Bitmap contains 64 fields (named Bit001 to Bit064), each of which is defined to be an unsignedInt, occur exactly once, and to be one bit long. The complex element representing the Secondary Bitmap contains 64 fields (named Bit065 to Bit128), each of which is defined to be an unsignedInt, occur exactly once, and to be one bit long. Each Message Data Field (which occur after the bitmaps in the model) is optional (minOccurs=0 and maxOccurs=1) and has an expression which defines the dfdl:occursCount attribute to be equal to the corresponding Bit from either the Primary Bitmap or the Secondary Bitmap. For example, the Message Data Field named PrimaryAccountNumber_002 has dfdl:occursCount="{/ISO8583_1987/PrimaryBitmap/Bit002}"

The Secondary Bitmap is itself an optional field. Bit001 in the Primary Bitmap defines whether or not there is a Secondary Bitmap in the message.

Message Data Fields

Each message field in the ISO8583 standard defines its permitted content using one of the following data types:

Numeric Data Types

Numeric data elements are right justified and when defined to have a fixed length, they contain leading zeroes. The ISO8583 standard refers to numeric data elements using the attribute "n". This convention is reflected in the Simple Type names used in the DFDL model. Data elements defined as numeric can be used for a variety of business purposes - for example they may be used to carry decimal amounts, datetime values, or string numeric data such as a bank account number. To reflect this usage, the DFDL model defines distinct XML schema Simple Types which inherit from different XML schema primitive data types. These Simple Types are named:

Alphabetic Data Type

Alphabetic data elements are left justified and when defined to have a fixed length, they contain trailing space characters. The ISO8583 standard refers to alphabetic data elements using the attribute "a". This convention is reflected in the Simple Type name used in the DFDL model for alphabetic data types:

Alphanumeric Data Type

Alphanumeric data elements are left justified and when defined to have a fixed length, they contain trailing space characters. The ISO8583 standard refers to alphanumeric data elements using the attribute "an". This convention is reflected in the Simple Type name used in the DFDL model for alphanumeric data types:

Alphanumeric Special Data Type

Alphanumeric special data elements are left justified and when defined to have a fixed length, they contain trailing space characters. The ISO8583 standard refers to alphanumeric special data elements using the attribute "ans". This convention is reflected in the Simple Type name used in the DFDL model for alphanumeric special data types:

Binary Data Type

Binary data elements have lengths that are an integral number of bytes long. No binary data element has a length of less than eight bits (one byte). The ISO8583 standard refers to binary data elements using the attribute "b". This convention is reflected in the Simple Type name used in the DFDL model for binary data types:

Track Data Type

The ISO8583 standard defines certain data elements to be of "track-2" or "track-3" type. The detailed syntax of these elements is subject to further ISO standards. The ISO8583 standard refers to the Track data type using the attribute "z". This convention is reflected in the Simple Type names used in the DFDL model:

Data Types with a Length Prefix

Some data elements are defined by the ISO8583 standard to be of variable length and contain a length prefix which specifies the length of that occurrence of the field. The length is specified using either two or three numeric digits. The ISO8583 standard refers to the length prefix using the convention "LL" to represent lengths in the range 01-99 and "LLL" to represent lengths in the range 001-999. Data elements which are defined in this way may also have further restrictions (for example the PrimaryAccountNumber element has an LL prefix but also has a maximum length of 19 bytes). These restrictions are reflected in the DFDL model using facets. The DFDL model defines the following Simple Types which use a length prefix:

Back to sample home