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 » Storing and reading incoming msg from DB

Post new topic  Reply to topic
 Storing and reading incoming msg from DB « View previous topic :: View next topic » 
Author Message
amerlin
PostPosted: Thu Dec 08, 2011 2:40 am    Post subject: Storing and reading incoming msg from DB Reply with quote

Newbie

Joined: 28 Nov 2011
Posts: 4

Hello,
I'm stuck with pretty simple task - I get some xml msg from MQ queue(MQInput) add/append some nodes(xml tags)(Java compute node) store result in DB(DB node), after that when to read what is stored in db(Compute node) and proccess this farther..

Here code snipped I use to store to DB
INSERT INTO Database.TEST(SOME) VALUES(
ASBITSTREAM(Root.XMLNSC));

That is fine,
Now I'm trying to fetch msg from DB, for example in this way:
SET OutputRoot.XMLNSC = (THE (SELECT T.SOME FROM Database.TEST as T WHERE T.SOMEID=1));

But the result is diff from what I stored - It adds 1 extra tag - SOME(as column name in DB or I can give some alias I guess) but I don't need it
Also, the value of this node is whole content that is in DB column, it seems it is trated as text and not parsed..
Any ideas how I can read/restore msg exactly in the same fromat as it was stored ?

Thank you
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Dec 08, 2011 3:39 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

You are storing you xml in bistream format so you need to parse it with XMLNSC parser after you have fetched it from db. Use Row variable, Environment or Local Environment as temporary cache. That is direct the result from select clause there and use create statement with parse clause to build your OutputRoor.XMLNSC subtree.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
amerlin
PostPosted: Thu Dec 08, 2011 3:55 am    Post subject: Reply with quote

Newbie

Joined: 28 Nov 2011
Posts: 4

Hi Marko,
Thank you,
Can you give me some idea how to do it ?
I mean, how to use parser can't find good example on it
I did
SET OutputLocalEnvironment.MyData = THE (SELECT T.SOME FROM Database.TEST as T WHERE T.SOMEID=1);
After that I need to do something like
CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(OutputLocalEnvironment.MyData);

But it is not working - throwing excpetion, some params missing...or ?
Any ideas ?
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Dec 08, 2011 5:34 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

Did you read this document from the Information Center http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ak04950_.htm ?

And make sure you are referencing correctly your bitstream.

--
marko
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Storing and reading incoming msg from DB
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.