0
Im Sonic JSM隊列的新成員。我需要發送一個XML消息到JSM隊列。我可以使用以下代碼發送字符串消息。發送XML消息給SONIC JMS隊列
Dim msg As Sonic.Jms.TextMessage = SonicSendSession.createTextMessage()
msg.setText(ESBMessage)
msg.setStringProperty("instance", Header)
SonicSender.send(msg, Sonic.Jms.DeliveryMode.PERSISTENT, Sonic.Jms.DefaultMessageProperties.DEFAULT_PRIORITY, MESSAGE_LIFESPAN)
這工作正常。但是,在聽到這個消息
的Content-Type = text/plain的
但我需要將其設置爲
內容類型:文本/ XML
我可以通過以下代碼發送它。
Dim msg As Sonic.Jms.Message = SonicSendSession.createMessage()
msg.setJMSMessageID(ESBMessage)
msg.setStringProperty("instance", Header)
SonicSender.send(msg, Sonic.Jms.DeliveryMode.PERSISTENT, Sonic.Jms.DefaultMessageProperties.DEFAULT_PRIORITY, MESSAGE_LIFESPAN)
但我不能將我的xml消息添加到此消息。我使用VS 2010/VB.net。 請幫忙。
Thanx提前。