【问题标题】:how to send and receive xml file through JMS and Websphere MQ in j2EE application如何在 j2EE 应用程序中通过 JMS 和 Websphere MQ 发送和接收 xml 文件
【发布时间】:2015-12-25 18:48:52
【问题描述】:

我是 JMS 和 MQ 的新手。我想知道如何在 j2EE 应用程序中通过 JMS 和 Websphere MQ 发送和接收 xml 文件。有人可以告诉我代码示例的逐步解决方案

提前致谢。

【问题讨论】:

    标签: java jakarta-ee jms ibm-mq mq


    【解决方案1】:

    非常接近这个问题:Send and Receive XML formatted text to IBM WebSphere MQ using XMS 除了编程语言,即 .NET。

    XML 是文本,因此您可以使用 JMS TextMessage 发送/接收 XML 有效负载。示例 sn-p 在这里:

            connection = cf.createConnection();
            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            destination = session.createQueue(destinationName);
            producer = session.createProducer(destination);
            TextMessage message = session.createTextMessage(xmlPayload);
            producer.send(message);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-12-19
      • 2011-12-12
      • 2013-01-09
      • 1970-01-01
      • 2011-11-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多