ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ JMS_IBM_Encoding error

Post new topic  Reply to topic
 MQ JMS_IBM_Encoding error « View previous topic :: View next topic » 
Author Message
wacollin
PostPosted: Tue Dec 10, 2002 7:20 am    Post subject: MQ JMS_IBM_Encoding error Reply with quote

Newbie

Joined: 24 Jun 2001
Posts: 3
Location: Sunny Florida

I am writting a JMS Application using MQ 5.2.

I receive a message from the input queue and use the contents of the input message
to create an output message. I am required to set the Format, Coded Character Set ID and Encoding
of the output message the same as the input message.

Looking at the "Properties for Message"/"Data" tab in the MQSeries Explorer the following is specified for

the input
message.

Format: MQSTR
Coded Character Set ID: 819
Encoding: 273

I use the following code:

//Format
String format = message.getStringProperty("JMS_IBM_Format");

SysLogger.Log(SysLogger.INFO, "Format = " + format);

outmessage.setStringProperty("JMS_IBM_Format", format);

// Character Set
String charSet = message.getStringProperty("JMS_IBM_Character_Set");
SysLogger.Log(SysLogger.INFO, "charSet = " + charSet);
outmessage.setStringProperty("JMS_IBM_Character_Set", charSet);

// Encoding
try {
int encoding = message.getIntProperty("JMS_IBM_Encoding");
SysLogger.Log(
SysLogger.INFO,
"TransferAggMsgs2::process::Encoding = ::" + encoding + "::");
outmessage.setIntProperty("JMS_IBM_Encoding", encoding);
} catch (NumberFormatException e) {
SysLogger.Log(
SysLogger.INFO,
"TransferAggMsgs2::process:: Got NumberFormatException on

message.getIntProperty");
}


I get the following output

message.getStringProperty("JMS_IBM_Format") prints MQSTR
message.getStringProperty("JMS_IBM_Character_Set") prints null
and
int encoding = message.getIntProperty("JMS_IBM_Encoding");
throws the NumberFormatException
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ JMS_IBM_Encoding error
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.