ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Access to the content of message body in JAVA Plugin

Post new topic  Reply to topic
 Access to the content of message body in JAVA Plugin « View previous topic :: View next topic » 
Author Message
imsja
PostPosted: Wed May 14, 2003 11:32 am    Post subject: Access to the content of message body in JAVA Plugin Reply with quote

Newbie

Joined: 23 Apr 2002
Posts: 3


Question from a primer:

we have developed an IDOC parser/generator, which runs fine in standalone mode. We want to use it inside a JAVA plugin for WMQI. For converting the native IDOC string, that comes into the plugin in BLOB-format, we must extract these characters out of the MbMessage element, process it to its XML-representation and finally put the result into a new Message as XML. The way from IDOC/XML to native IDOC works inversely. The MbMessage must provide the body in XML-format and we want to put BLOB to the output terminal after converting in the IDOC generator.

Put into one question: How can I access the whole BLOB of the body?

Thanks for help
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 14, 2003 11:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have you read the Programming Guide? It tells you how to access the contents of your message body from a Java node.

Here's a quick example:
Code:
MbElement rootElement = assembly.getMessage().getRootElement();
MbElement blobElem = rootElement.getFirstElementByPath("./BLOB/BLOB");
byte[] blobData = (byte[])(blobElem.getValue());

This is untested code, and there's probably a better way to get the bytes from the blob field.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Access to the content of message body in JAVA Plugin
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.