Click here to Skip to main content
15,884,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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);
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900