Apr 15th, 2009, 10:58 AM
Working with Messages
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.
Apr 16th, 2009, 05:31 AM
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 at 05:35 AM.
Apr 16th, 2009, 06:19 AM
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!