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 » Retrieving BLOB message from Database using ESQL

Post new topic  Reply to topic
 Retrieving BLOB message from Database using ESQL « View previous topic :: View next topic » 
Author Message
AJStar
PostPosted: Mon Jul 09, 2007 10:29 pm    Post subject: Retrieving BLOB message from Database using ESQL Reply with quote

Acolyte

Joined: 27 Jun 2007
Posts: 64

Scenario:
(1) XML message received in input queue.
(2) Domain is MRM.
(3) Message converted to BLOB using following statement...
DECLARE InputMsg_Blob BLOB ASBITSTREAM(InputRoot, InputRoot.Properties.Encoding, InputRoot.Properties.CodedCharSetId);
(4) BLOB data inserted into DB (there is a BLOB column in DB table).

Problem:
(a) I want to retrieve the BLOB data.
(b) Cast it to character.
(c) Send the xml message to output queue.

Since the message goes in with the header too, is it possible to retrieve the message and perform (b) & (c) that I have mentioned?

Any inputs on this will be very helpful.

Thanks, AJ
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 10, 2007 2:57 am    Post subject: Reply with quote

Grand High Poobah

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

Why? Just retrieve the Blob, set the CCSID and encoding to match the data in the Blob and output the Blob to the queue. Casting to char will only meddle things. If you want to inspect the XML data you would need to PARSE the Blob before sending it to the output queue.... Use either XMLNS or MRM parser...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
au@kosa
PostPosted: Tue Jul 10, 2007 5:53 am    Post subject: Reply with quote

Centurion

Joined: 04 Jan 2007
Posts: 103
Location: pune

You can acheive it using RCD node . Configure the RCD node to change the input BLOB domain to XML or XMLNS domain.
_________________
Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate
Back to top
View user's profile Send private message Yahoo Messenger
wbi_telecom
PostPosted: Tue Jul 10, 2007 7:17 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

Or use CREATE and PARSE on the BLOB using appropriate CCSID and Encoding.

Cheers,
Back to top
View user's profile Send private message
AJStar
PostPosted: Tue Jul 10, 2007 9:28 pm    Post subject: Retrieving BLOB message from Database using ESQL Reply with quote

Acolyte

Joined: 27 Jun 2007
Posts: 64

Thanks for all your inputs.

All your suggestions work fine... but only when the xml message that has been converted to blob and inserted into DB has gone in without the message header.

While trying to retrieve the message in such a case, and then parse it, it fails. Please note that retrieving the message from DB is not the problem, but I do not want the hexadecimal data (blob) that it gives. That is why I am trying to cast or parse, to change it back to the readable xml message. This works fine only when the message has gone in without the message header.

Any suggestions on this ?

Thanks, AJ
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jul 11, 2007 4:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So what you're saying is, when you retrieve a blob of data that is described by two different parsers (MQMD and XML), and then try to parse it using only one of them (XML), then it doesn't work?

Maybe you should save the headers separately.
_________________
I am *not* the model of the modern major general.
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 » Retrieving BLOB message from Database using ESQL
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.