IBM Support

A WebSphere Transformation Extender map in a WebSphere Enterprise Service Bus mediation flow corrupts or truncates text output on Linux platforms

Troubleshooting


Problem

A WebSphere® Transformation Extender map primitive that executes a map in a WebSphere Enterprise Server Bus (ESB) mediation flow corrupts or truncates characters in text output on Linux® platforms.

Symptom

t

Cause


Java Virtual Machines (JVMs) use different encoding on different platforms. For example, the JVM on a Microsoft® Windows® system uses code page 1252 (LATIN 1) encoding, while the JVM on a Linux system uses UTF-8 encoding.

In a mediation flow, WebSphere ESB can alter the data depending on the default JVM encoding of the platform. For example, on a Linux system, WebSphere ESB can convert the data to UTF-8 before the data reaches WebSphere Transformation Extender, which changes the output data from a WebSphere Transformation Extender map.

When the WebSphere Transformation Extender map primitive receives a business object that is an instance of string data, such as comma-separated value (CSV) data, and the map primitive uses a type tree (.MTT file) instead of a native schema, the map primitive receives the data in the native-encoding of the JVM on that platform.

When the type tree is defined as native schema, on output the type tree converts the input data to UTF-8 encoding to match the schema.

  • On a Windows system, the type tree correctly converts the LATIN 1-encoded data to UTF-8 encoding; for example, by converting 0xDF to 0xC39F.
  • On a Linux system, the type tree converts data that is already UTF-8 encoded; for example, by converting 0xC39F to 0xC383C29F. The conversion causes the data corruption or truncation.

Resolving The Problem


This workaround prevents WebSphere ESB from manipulating the data before the data gets to the WebSphere Transformation Extender map. The workaround is required only for data objects that are not business objects (for example, an "instance of string"), when the characters can be greater than the 0x7f value.

  1. In WebSphere Integration Developer, change the encoding on the Binding of the FlatFileExport to BINARY instead of ISO-8859-1.
  2. On the WTX primitive properties > Default > Map Cards > Input Data Path, choose AsBinary rather than AsText.

Now you can deploy the same map and type tree without modification on either a Linux system or a Microsoft Windows system.

[{"Product":{"code":"SSVSD8","label":"IBM Transformation Extender"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"WTX for Integration Servers","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"8.3.0.3;8.3.0.2;8.3.0.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
23 June 2018

UID

swg21412633