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 » To extract the full XML and store it in the database

Post new topic  Reply to topic
 To extract the full XML and store it in the database « View previous topic :: View next topic » 
Author Message
limal_raja
PostPosted: Wed Nov 11, 2009 8:38 pm    Post subject: To extract the full XML and store it in the database Reply with quote

Novice

Joined: 11 Nov 2009
Posts: 19

Hi,
We are using WMB6.0 in our project. We have a requirement where we have to store the 3-4 attributes from the incoming message and also the request XML(full) message in the database.

We are using a Java compute node to parse and retrieve values from the incoming MbMessage, this is all fine, however we are not able to extract the XML as a whole.

Any code snippets or example projects would be of great help.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Nov 11, 2009 9:37 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

the inMessage will give you the complete input message details

manipulate and insert it in to the DB
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Nov 11, 2009 9:48 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

you will get some more idea from this link


http://www.mqseries.net/phpBB2/viewtopic.php?t=47422&highlight=extract+part+xml
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
limal_raja
PostPosted: Wed Nov 11, 2009 10:56 pm    Post subject: Reply with quote

Novice

Joined: 11 Nov 2009
Posts: 19

hi,
The above link only says about extracting part of the xml which we are already doing, but we would require the entire xml to be extracted along with the envelope & headers
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Nov 12, 2009 12:56 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

The easiest way would be to convert the whole thing into a BLOB and store that. There are several posts here on that very topic.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
limal_raja
PostPosted: Thu Nov 12, 2009 7:48 am    Post subject: Reply with quote

Novice

Joined: 11 Nov 2009
Posts: 19

hi,
the actual requirement is something like we have to encrypt the request xml store it in the datbase, again in a later point of time retrieve it decrypt it make changes to the XML and publish it back inot a queue.

So we are looking for ways which can retrieve the XML string for encryption.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Nov 12, 2009 7:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The same way.

Better to tell the DB to encrypt and decrypt for you.
Back to top
View user's profile Send private message
limal_raja
PostPosted: Fri Nov 13, 2009 12:55 am    Post subject: Reply with quote

Novice

Joined: 11 Nov 2009
Posts: 19

The current version of Orcale being used does not support Encryption/Decryption and theres no time for migration also, that is why we were asked to handle encryption decryption in the middleware.

Please share sample source if any where the whole xml can be retrieved from the MbMessage/MbAssembly
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Fri Nov 13, 2009 1:11 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

smdavies has given you a hint in that you need to convert this to a message to a BLOB (or byte[] in Java). What progress have you made on researching this? What did you find? What did you try? For example did you look at the toBitStream method (or ASBITSTREAM in ESQL).

You are more likely to get people giving you hints than source code as we are here to help you, but not do your job for you.

Just for completeness and i'm sure you're aware already but it doesnt hurt to reiterate it, you still need to apply the encryption to the resulting byte[] (i've actually met people that think that the BLOB produced is a form of encryption).
Back to top
View user's profile Send private message
limal_raja
PostPosted: Mon Nov 16, 2009 11:22 pm    Post subject: Reply with quote

Novice

Joined: 11 Nov 2009
Posts: 19

hi all,
thanks for your replies.

toBitStream worked. it gave out a byte[] which we converted into a hex and the char value of it gave out the exact XML string.
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 » To extract the full XML and store it in the database
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.