Author |
Message
|
limal_raja |
Posted: Wed Nov 11, 2009 8:38 pm Post subject: To extract the full XML and store it in the database |
|
|
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 |
|
 |
Gaya3 |
Posted: Wed Nov 11, 2009 9:37 pm Post subject: |
|
|
 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 |
|
 |
Gaya3 |
Posted: Wed Nov 11, 2009 9:48 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
|
Back to top |
|
 |
limal_raja |
Posted: Wed Nov 11, 2009 10:56 pm Post subject: |
|
|
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 |
|
 |
smdavies99 |
Posted: Thu Nov 12, 2009 12:56 am Post subject: |
|
|
 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 |
|
 |
limal_raja |
Posted: Thu Nov 12, 2009 7:48 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Thu Nov 12, 2009 7:55 am Post subject: |
|
|
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 |
|
 |
limal_raja |
Posted: Fri Nov 13, 2009 12:55 am Post subject: |
|
|
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 |
|
 |
WMBDEV1 |
Posted: Fri Nov 13, 2009 1:11 am Post subject: |
|
|
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 |
|
 |
limal_raja |
Posted: Mon Nov 16, 2009 11:22 pm Post subject: |
|
|
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 |
|
 |
|