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 » Accessing XML message in java plug-in

Post new topic  Reply to topic
 Accessing XML message in java plug-in « View previous topic :: View next topic » 
Author Message
vjv18bet
PostPosted: Wed Aug 14, 2002 2:24 am    Post subject: Accessing XML message in java plug-in Reply with quote

Newbie

Joined: 14 Aug 2002
Posts: 1

Hi,
I have to develop custom java plug-in that will receive XML message and pass it to another application (DLL). I don't need to parse this XML, just throw it out. The problem is that I don't know how to get the XML message from the assembly as is. Can you provide me some example how to do this? Any help would be appreciated.
_________________
Regards
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Aug 15, 2002 3:44 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

In your evaluate method, first extract the Message tree from Message Assembly, using
Code:

MbMessage msg = messageAssembly.getMessage();


Now, get the data buffer for the message.
Code:

byte[] messagetext = msg.getBuffer();


Now you could pass this extracted message buffer messagetext to your DLL.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
jmbdel
PostPosted: Mon Aug 19, 2002 5:45 am    Post subject: Accessing XML message in Java plugin Reply with quote

Newbie

Joined: 22 Apr 2002
Posts: 4

Hi,

The getBuffer() method is OK to get the entire message, but is it possible to get the XML part only ? this means message without the headers.
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Mon Aug 19, 2002 7:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I don't think there is any API/Utility function to retrieve XML message body at once. You will need a function like BITSTREAM, which will return byte stream of the parsed XML tree.

If your message is in BLOB domain, you could use existing API functions to retrive message body. Use combination of getRootElement, getFirstElementByPath and getValue utility functions.

I hope this helps.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
jmbdel
PostPosted: Tue Aug 20, 2002 3:52 am    Post subject: Reply with quote

Newbie

Joined: 22 Apr 2002
Posts: 4

Thanks Kiran, I thaught on this possibility already, but didn't try, because I need to change the domain between the MQInput and the plugin. I would like to use the next future possibility of schema checking.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Accessing XML message in java plug-in
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.