[Top] [Previous] [Next] [End of Book]

# Chapter 5 . Data Translations

BEA Connect OSI TP uses typed buffers to transmit and receive data. BEA Connect OSI TP supports the following buffer types:

- VIEW

- X_C_TYPE

- X_COMMON

- STRING

- CARRAY

  - X_OCTET

  Note: Zero length STRINGs or X_OCTET buffers are not supported.

  > Figure 5-1 Mapping Parameters during Locally Originated Calls

## Layout Conversion for Buffer Types

XATMI (X/Open Application Transaction Manager Interface) mappings to OSI TP are defined in the XATMI ASE (Application Service Element). BEA Connect OSI TP supports this combination. Interoperability using Connect OSI TP requires that remote systems support XATMI ASE.

Therefore, TUXEDO-specific buffer types, such as STRING, VIEW, and CARRAY may need to be converted into XATMI standard types. BEA Connect OSI TP Gateways perform these layout conversions implicitly.

### ASN.1 Encoding

Abstract Syntax Notation 1 (ASN.1) is an international standard that provides a canonical representation to deal with data representation differences such as byte order, word length, and character sets. The local Gateway (GWOSITP) encodes input from the local client program. It produces an ASN.1 encoded record that is sent to the remote service. When a reply is received, it is decoded before being returned to the client. Similarly, when remote requests for local services are received by the local Gateway, they are decoded from the ASN.1 format. Replies are then encoded for return to the remote client.

### Summary of Mappings

The local Gateway (GWOSITP) maps input buffers to input records based on information found in the configuration setting for the local and remote services. The following summarizes all the mapping possibilities:

> Figure 5-2 Input Mappings

As illustrated, the mapping possibilities include:

- TUXEDO CARRAY input buffer can be copied to X_OCTET input records. A CARRAY buffer contains raw data that is ASN.1 encoded.

- TUXEDO STRING input buffers can be mapped to X_OCTET input records. The buffer goes through ASN.1 encoding.

- TUXEDO VIEW input buffers can be mapped to X_C_TYPE and X_COMMON. The buffers go through ASN.1 encoding.

While the previous figure illustrates input mapping, output mapping follows exactly the same paths but in reverse.

> Figure 5-3 Output Mappings

## Application Programming

TUXEDO application programs that send requests through BEA Connect OSI TP are developed like other TUXEDO application programs.

Information on the supported ATMI calls and recommendations for selecting the buffers used in application programs are the major considerations for programmers.

### Supported ATMI Calls

The request/response calls supported by BEA Connect OSI TP are the following:

- tpcall

- tpacall (including TPNOREPLY)

- tpgetrply

- tpcancel

- tpservice

- tpreturn

- tpforward

The conversational calls supported by BEA Connect OSI TP are the following:

- tpconnect

- tpsend

- tprecv

- tpdiscon

- tpservice

- tpreturn

### Considerations for Selecting Buffers

Consider the following recommendations when selecting buffers in application programs.

- Use VIEW for programming action. This couples local and remote record layouts, but it does not couple data representations.

- Use STRING buffers to represent a single value (field), or variable length (delimited) character fields. Multiple fixed length substrings may be mapped using VIEWs.

- Avoid CARRAYs, if possible, because CARRAYs most tightly couple local and remote data representations. Acceptable uses include bitmaps and multibyte characters.

### System Programming

Because mapping keeps system dependencies out of application code, it may be thought of as a system programming (or an application administration) activity. System programming activity is done once VIEWs have been defined and VIEW files have been compiled.

#### Defining VIEWs

Work with the application programmers for the host system to determine the input and output record layouts for the remote application programs. Create standard TUXEDO VIEW definitions in files.

#### Compiling VIEW Files

TUXEDO VIEW definitions in files, compile the VIEW files by running the viewc VIEW compiler.

If necessary, set the VIEWFILES, VIEWDIR, FIELDTBLS, and FLDTBLDIR environment variables using a TUXEDO ENVFILE so that BEA Connect OSI TP servers can locate binary VIEW files and field table files at runtime.

[Top] [Previous] [Next] [End of Book]