|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ -> MQe |
« View previous topic :: View next topic » |
Author |
Message
|
MichaelB |
Posted: Mon Sep 25, 2006 9:31 am Post subject: MQ -> MQe |
|
|
Guest
|
Hi,
Im trying to establish a connection between MQ and MQe. I've finished all administration and can send messages from mq to mqe and the other way. But the messages arrive in a wrong format.
MQ v6 is running on Linux, MQe v2 on Windows, using UTF-8. My CCSID is 1028.
After a lot of time trying I found out, how to send messages from MQe to MQ:
MQe-side:
Code: |
MQeMQMsgObject msg = new MQeMQMsgObject();
msg.setData("Hello world!".getBytes());
qm.putMessage(remoteManagername, queueName, msg, null, 0); |
MQ-side:
Code: |
public void onMessage(Message message) {
try {
JMSBytesMessage m = (JMSBytesMessage) message;
byte[] b = m._exportBody(0, null);
System.out.println(new String(b));
} catch (Exception e) {
System.out.println(e);
}
} |
Im not sure, if thats the best way to send data, maybe you know a better way. But I dont have any idea how to send data from MQ to MQe. I've already tried to set a Transformer, but it didnt make any difference, when I set it to the bridge. After all I even didnt get failure-notice when I tried to setup a not existing Transformer.
Hope somebody can help me.
Best regards Michael |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Sep 25, 2006 3:14 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well the CCSID for UTF-8 is not 1028 but 1208!
And make sure to set the format to MQSTR (Use the literal equivalent from the constants)
Hope this helps.
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|