cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in JMS-Adapter with CharacterSet Websphere MQ

thorsten_hautz
Participant
0 Kudos

Hi,

we have the following scenario:

JMS -> PI -> File

We have a local Websphere MQ Queue Manager and the follwoing configuration in our sender adapter:

Transport-Protocol: WebSphere MQ (non JMS)

Message-Protocol: JMS 1.x

ConnectionFactory: com.ibm.mq.jms.MQQueueConnectionFactory

Java-class Queue: com.ibm.mq.jms.MQQueue

CCSID: 819

Transport: TCP/IP

JMS-conform: WebSphere MQ (non JMS)

In the local queue manager the messages (XML-Messages with header <?xml version="1.0" encoding="ISO-8859-1"?>) have characterSet 819 (ISO-8859-1). That's correct. You can open the files with XMLSpy and it works.

When we receive the messages by our JMS Sender Adapter all the character seems to be in UTF-8 and I don't know why. All the special characters are wrong cause the header of the XML-message shows ISO-8859-1 but all the signs are decoded in UTF-8.

In the other direction (JMS Receiver adapter, File -> PI - JMS) we have the same problem.

We create a ISO-8859-1 message in mapping (and it is really ISO-8859-1) and send it via JMS Receiver Adapter to the local message queue. But there the message arrives in UTF-8 encoding. I don't understand this.

Does anybody know what could be the cause for this?

Does the JMS adapter convert the messages from ISO-8859-1 into UTF-8?

Are there any parameters we have to set?

I hope anybody has an idea what's wrong.

Regards

Thorsten

Edited by: Thorsten Hautz on Oct 12, 2010 5:42 PM

View Entire Topic
stefan_grube
Active Contributor
0 Kudos

> CCSID: 819

When you assign a CCSID, then the JMS adapter converts to UTF-8.

When there is no CCSID, then no conversion takes place. (This is similar to file adapter)

So leave the field empty.

thorsten_hautz
Participant
0 Kudos

Hi,

thanks a lot for your replies.

our driver settings are correct (as I can see).

I removed value 819 from CCSID, but we have the same effect.

The messages in the local queue manager are TextMessages in XML.

Does anybody know, if we need the standard modules (ConvertJMSMessageToBinary and ConvertBinaryToXMBMessage) in this case?

Is it possible to set the CCSID for the message payload anywhere in the configuration?

The CCSID in the Source tab doesn't have any influence to the encoding of the payload message, only to the header data.

Regards

Thorsten

stefan_grube
Active Contributor
0 Kudos

> I removed value 819 from CCSID, but we have the same effect.

Try to put the CCSID value for UTF-8

> The messages in the local queue manager are TextMessages in XML.

> Does anybody know, if we need the standard modules (ConvertJMSMessageToBinary and ConvertBinaryToXMBMessage) in this case?

Yes

> The CCSID in the Source tab doesn't have any influence to the encoding of the payload message, only to the header data.

Which header data are influenced?

thorsten_hautz
Participant
0 Kudos

Hi Stefan,

thanks.

I ment this part of the SAP JMS Sender Adapter documentation (http://help.sap.com/saphelp_nwpi71/helpdata/en/44/85c63079d36572e10000000a11466f/content.htm):

Under Character Set ID (CCSID) for Non-ASCII Names, specify the character set for the names specified above.

This entry does not affect the character set of the transferred messages.

So it seems the CCSID you entered in the configuration doesn't have any effect to the payload encoding itself (as I understand).

Regards

Thorsten

stefan_grube
Active Contributor
0 Kudos

> This entry does not affect the character set of the transferred messages.

That means: It does not affect the encoding declaration in the XML message header.

stefan_grube
Active Contributor
0 Kudos

Try following:

In your module configuration set the following parameters for the module SendBinarytoXIJMSService:

JMSMessageType = Byte

http://help.sap.com/saphelp_nwpi71/helpdata/EN/4d/a3bc97ff55c742af7faed661635baf/frameset.htm

For your sender JMS adpter use the XMLAnonimyzerBean to change the XML encoding.

In receiver adapter you need not change the encoding, this will done by mapping.

thorsten_hautz
Participant
0 Kudos

Hi,

thanks a lot for your support.

We could solve the problem now.

After setting CCSID to 819 and the parameter JMS.TextMessage.charset to ISO-8859-1 (in Sender and in Receiver Adapter) it works fine. I only found a hint to this parameter in note 1346110 and not in the documentation.

Regards

Thorsten