Websphere MQ和C#messagetypeuri和格式 [英] Websphere MQ and C# messagetypeuri and format

查看:108
本文介绍了Websphere MQ和C#messagetypeuri和格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从我的c#应用程序向使用amqmdnet库通过Websphere Mq进行通信的Java应用程序发送消息。我能够成功连接到MQ服务器并将消息发送到Java应用程序。



Java应用程序中收到的消息缺少2个属性



messagetypeuri,URI:xxxx:xxxx:xxxx和

格式,xml

如何在我的c#代码上设置这些参数。



queueMessage = new MQMessage();

queueMessage.CorrelationId = corrID;

queueMessage.CharacterSet = 1208;

queueMessage.Format = MQC.MQFMT_STRING;

queuePutMessageOptions = new MQPutMessageOptions();

byte [] utf8String = Encoding.UTF8.GetBytes(message);

string msg = BitConverter.ToString(utf8String);

queueMessage.WriteBytes(utf8String);

queue.Put(queueMessage,queuePutMessageOptions);

Im trying to send a message from my c# application to a Java application communicating through the Websphere Mq using the amqmdnet library. I'm able to successfully connect to the MQ server and send the message to the Java application.

The messages received in the Java application are missing 2 properties

"messagetypeuri", "URI:xxxx:xxxx:xxxx" and
"format", "xml"
How do i set these parameters on my c# code.

queueMessage = new MQMessage();
queueMessage.CorrelationId = corrID;
queueMessage.CharacterSet = 1208;
queueMessage.Format = MQC.MQFMT_STRING;
queuePutMessageOptions = new MQPutMessageOptions();
byte[] utf8String = Encoding.UTF8.GetBytes(message);
string msg = BitConverter.ToString(utf8String);
queueMessage.WriteBytes(utf8String);
queue.Put(queueMessage, queuePutMessageOptions);

推荐答案

这篇关于Websphere MQ和C#messagetypeuri和格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆