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 » String representation of MbElement

Post new topic  Reply to topic
 String representation of MbElement « View previous topic :: View next topic » 
Author Message
sunithe
PostPosted: Thu Jun 01, 2006 7:54 pm    Post subject: String representation of MbElement Reply with quote

Newbie

Joined: 01 Jun 2006
Posts: 1

Hi All,

How can I get the String representation of a MbElement. Basically my requirement is that the Input message will be in an XML format. I need to send this to a Java method which can accept only String parameter. This method will write this XML message into a file.

-- some code here
CALL writeLog(InputRoot.XML);
-- some code here

CREATE PROCEDURE writeLog(IN MSG REFERENCE)
LANGUAGE JAVA
EXTERNAL NAME "com.bt.ReadFile.writeLog";

And the Java class will look like:
public class ReadFile {
public static void writeLog(MbElement mbl)
{
try{
writeLog('???????'); ----- Here I need to convert MbElement into a String.
}catch(MbException mbe)
{
}
}
}

Any guidance is appreciated. Basically we need to write the data coming in from an MQ.

Regards,
Sunitha
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 02, 2006 2:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you looked at the ESQL ASBITSTREAM ?
Yes it gives you a BLOB, well CAST that to a CHARACTER and pass it to the Java part.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jbanoop
PostPosted: Sat Jun 03, 2006 5:26 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

U could try the toString() on the MbElement. It seems to be overridden and should return you somthing meaningful i guess.
Worth a try.
Regards,
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » String representation of MbElement
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.