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 » Convert whole Message MRM to BLOB

Post new topic  Reply to topic
 Convert whole Message MRM to BLOB « View previous topic :: View next topic » 
Author Message
giorginus80
PostPosted: Thu Apr 02, 2009 1:49 am    Post subject: Convert whole Message MRM to BLOB Reply with quote

Centurion

Joined: 08 Jul 2008
Posts: 124
Location: Rome, Italy

Hi,
Lazy question, how can I parse whole Message in the MRM domain into a BLOB (I need to put it in an Blob Oracle Field).
I tried with
Code:

      DECLARE rispostaBitStream BLOB
           CAST(ASBITSTREAM(InputRoot.MRM
               OPTIONS parseOptions
               SET 'mySet'
               TYPE 'myType'
               FORMAT 'XML') AS BLOB);


But I have <MRM></MRM> tags at start and ends, how can I solve?
Thanks in advance
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Apr 02, 2009 2:07 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Ask yourself these questions:
- What data type does ASBITSTREAM return?
- What should parseOptions be set to? ( I have no idea how you are setting it, you omitted that line of code ).
- Is it possible that the message tree really is empty? How would you find out?
- Are the parameters to ASBITSTREAM correct? How would you find out? Hint: User trace is really useful.
Back to top
View user's profile Send private message
giorginus80
PostPosted: Thu Apr 02, 2009 2:10 am    Post subject: Reply with quote

Centurion

Joined: 08 Jul 2008
Posts: 124
Location: Rome, Italy

I changed
Code:

    DECLARE rispostaBitStream BLOB
           CAST(ASBITSTREAM(InputRoot.MRM
               OPTIONS parseOptions
               SET 'mySet'
               TYPE 'myType'
               FORMAT 'XML') AS BLOB);


with

Code:

      DECLARE rispostaBitStream BLOB
           CAST(ASBITSTREAM(InputRoot.MRM
               OPTIONS parseOptions
               SET InputRoot.Properties.MessageSet
               TYPE InputRoot.Properties.MessageType
               FORMAT InputRoot.Properties.MessageFormat) AS BLOB);


and with worked, I don't know why but with the first method the tags <MRM></MRM> are put in the field oracle blob...with the second method no tags. Strange beahviour.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Apr 02, 2009 2:18 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Arent you curious as to why it worked? Whats your theory on this?

Just out of interest, what was your answer to Kimberts first question....

Quote:
What data type does ASBITSTREAM return
Back to top
View user's profile Send private message
giorginus80
PostPosted: Thu Apr 02, 2009 2:23 am    Post subject: Reply with quote

Centurion

Joined: 08 Jul 2008
Posts: 124
Location: Rome, Italy

kimbert wrote:

- What data type does ASBITSTREAM return?


The same of the InputRoot.MRM, I have an MRM in a xml format ( may be it was better using XMLNSC domain I know)

kimbert wrote:

- What should parseOptions be set to?


I used:
Code:

DECLARE parseOptions INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue, ValidateLocalError);
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Apr 02, 2009 3:00 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Ok, i'll ask one more time and then I promise no more.....

giorginus80 wrote:
kimbert wrote:

- What data type does ASBITSTREAM return?


The same of the InputRoot.MRM


If ASBITSTREAMs return data type is the same as InputRoot.MRM then why use it ASBITSTREAM all? InputRoot.MRM is a message tree, what is ASBITSTREAMs?

and if all you changed was:
Code:

               SET InputRoot.Properties.MessageSet
               TYPE InputRoot.Properties.MessageType
               FORMAT InputRoot.Properties.MessageFormat


What do these evaluate to?
Back to top
View user's profile Send private message
giorginus80
PostPosted: Thu Apr 02, 2009 3:08 am    Post subject: Reply with quote

Centurion

Joined: 08 Jul 2008
Posts: 124
Location: Rome, Italy

I don't know why in this way I solved the tags problem.
In the Properties.Message* are the same values that I passed before, but when I look in the blob written in the db field I had the MRM tags (if I write the ASBITSTREAM parameters in the other way!
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Apr 02, 2009 4:41 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

- Remove the CAST statement. It is CASTing a BLOB to a BLOB. My first question was trying to help you to realize that for yourself.
- You are setting the parserOptions variable incorrectly. Please look carefully at what you have done, because the mistake should be obvious.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Apr 02, 2009 4:44 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

kimbert wrote:
- Remove the CAST statement. It is CASTing a BLOB to a BLOB. My first question was trying to help you to realize that for yourself.


.....and so were my follow on questions!!!!!
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 » Convert whole Message MRM to 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.