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 » Creating full message from BLOB

Post new topic  Reply to topic
 Creating full message from BLOB « View previous topic :: View next topic » 
Author Message
fitzcaraldo
PostPosted: Tue May 16, 2006 4:29 am    Post subject: Creating full message from BLOB Reply with quote

Voyager

Joined: 05 May 2003
Posts: 98

I am trying to write a procedure to store a full copy of a message (including the RFH2) in a database for later retrieval.

I take a copy of the message as follows:

Code:
declare messageToStore BLOB;
SET messageToStore = ASBITSTREAM(InputRoot,
                  InputRoot.MQMD.Encoding,
                  InputRoot.MQMD.CodedCharSetId,
                  InputRoot.Properties.MessageSet,
                  InputRoot.Properties.MessageType,
                  InputRoot.Properties.MessageFormat) ;


I then store it in a database. This all seems to work fine.

When I retrieve it I do the following:
Code:
set OutputRoot = NULL;

CREATE FIRSTCHILD of OutputRoot PARSE(messageToStore, InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId) ;


However the resulting message has the structure:

Code:
OutputRoot.Root.MQMD...
OutputRoot.Root.MQRFH2...
etc


ie it has an extra 'Root' folder. Anyone got any idea why?
Back to top
View user's profile Send private message
madi
PostPosted: Tue May 16, 2006 6:25 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

I think that is how parse works

u can say PARSE(MSG,InputRoot.MQMD ..., CodedCharSetId,'','','XML') and the tree will be created under XML

otherwise it just defaults to Root which is happening in ur case

what you can do is just add the code

OutpuRoot = OutputRoot.Root;
delete field OutputRoot.Root;

and everything is good to go

--madi


Last edited by madi on Tue May 16, 2006 7:03 am; edited 1 time in total
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 16, 2006 6:45 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So...you needed information about the MessageSet, MessageType and MessageFormat in order to serialize this message ( see the ASBITSTREAM call ) but you expected it to get parsed without any of that information!
This problem has been solved dozens of times on this forum. Use the Search button , and look for 'CREATE FIELD PARSE MRM'.
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 » Creating full message from BLOB
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.