Announcement Announcement Module
No announcement yet.
Working with Messages Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Working with Messages

    Hi all,

    Ok, so I got my MQ setup and I put a few messages on the Q. I then use SI to pull a message off and write it away as a Blob in the DB. I know need to select the Blob and extract the XML message. Can someone please assist with the easiest way to do this.

    many thanx

  • #2
    just to clarify, I have selected the Blob into a GenericMessage object. How does one extract the original XML from the object? I've checked the docs for working with the Message object but dont really find anything that points me in the right direction, anyone got some advice?
    Last edited by dudleygb; Apr 16th, 2009, 05:35 AM.


    • #3
      now i feel stupid, I've done this before on another project
      simply a Message Object holds a payload. In my case, here is how I get my payload from an MQ message

      public <T extends Serializable> void getPayloadAsString(Message<T> inMessage)
      byte[] msg = (byte[]) inMessage.getPayload();
      String out = new String(msg);;

      Simple as that!