How to publish a message which includes a NULL value by TIBCO ActiveMatrix Adapter for WebSphere MQ?

How to publish a message which includes a NULL value by TIBCO ActiveMatrix Adapter for WebSphere MQ?

book

Article ID: KB0086023

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix Adapter for Websphere MQ -
Not Applicable -

Description

Resolution:
Description:
============
When use TIBCO ActiveMatrix Adapter for WebSphere MQ to publish a message which includes a NULL value from MQ queue to an EMS queue. If the data field of the schema is defined as type “String”, the message will be truncated and the part after the NULL value won’t be received. This is because the NULL character is the end mark of the string. So the data field should be defined as type “Binary”.

Environment:
==========
TIBCO ActiveMatrix Adapter for WebSphere MQ 5.x, 6.x

Resolution:
=========
Steps for resolving the problem:

1). Create a Publication service. Use the example_class schema with the default "Binary" type for the _data_ field.

2). Publish the binary message from MQ queue to EMS queue with the adapter.

3). Use a JMS Queue Receiver to receive the message. You should select "Text" for the Message Type of the JMS Queue Receiver.

4). Use the Parse XML activity to parse the message. Select "text" for the Input Style field on the Configuration tab.

5). Use the Map Data activity to convert the binary data to string with the "base64-to-string" mapping method.

Issue/Introduction

How to publish a message which includes a NULL value by TIBCO ActiveMatrix Adapter for WebSphere MQ?