1

I am new to JMS and MQ's. I want to know how to send and receive xml file through JMS and Websphere MQ in j2EE application.Can someone tell me the step wise solution for the same with code sample

Thanks in advance.

1 Answers1

0

Very close to this question: Send and Receive XML formatted text to IBM WebSphere MQ using XMS except for the programming language, i.e the .NET.

XML is text, so you can use the JMS TextMessage for sending/receiving XML payload. Sample snippet is here:

        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);
Community
  • 1
  • 1
Shashi
  • 14,980
  • 2
  • 33
  • 52