|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Parsing BLOB to XML |
« View previous topic :: View next topic » |
Author |
Message
|
kimbert |
Posted: Thu Sep 26, 2013 5:14 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Wait. I am not sure that I understand what this message flow is doing.
I wonder if you are implementing a store-and-forward system.
Are these statements correct? ( please check carefully )
- Flow1 receives an XML message via MQInput node
- Flow1 writes the XML without changing it at all to a CLOB field in a database.
- Flow2 reads the XML from the database table, and writes it to an MQ queue without changing it at all. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
alerajeshh |
Posted: Thu Sep 26, 2013 5:20 am Post subject: |
|
|
Acolyte
Joined: 19 Aug 2013 Posts: 55
|
Yes, you are right...
Flow1: I just want to keep the XML in database.
Flow2.Just retrieve the XML from database ,so that i can use for some other Input Node..
what do u mean by without changing it ? |
|
Back to top |
|
 |
kimbert |
Posted: Thu Sep 26, 2013 2:18 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Flow1: I just want to keep the XML in database.
Flow2.Just retrieve the XML from database ,so that i can use for some other Input Node.. |
So your data is XML, but these two message flows do not need to know that. You do not need to use the XMLNSC domain for this. In Flow1, set the 'Domain' on the MQInput node to 'BLOB' ( and change your code to use InputRoot.BLOB.BLOB ). In Flow2, set OutputRoot.BLOB.BLOB=<result of DB query>; _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
alerajeshh |
Posted: Fri Sep 27, 2013 4:49 am Post subject: |
|
|
Acolyte
Joined: 19 Aug 2013 Posts: 55
|
It just finished with only two statements
Flow1: INSERT INTO Database.SCHEMA.TABLE(BLOB) VALUES (InputRoot.BLOB.BLOB);
FLOW2:SET OutputRoot.BLOB[]=SELECT P.BLOB FROM Database.SCHEMA.TABLE AS P;
In FLOW2 after compute node i connected it to the MQ_Output and from there i moved it to the mq_input which shows in XMLNS format.
So For inserting and retrieving XML only 2 lines of code is required.. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Sep 27, 2013 4:57 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
alerajeshh said:
Quote: |
So For inserting and retrieving XML only 2 lines of code is required.. |
What you should have said is:
Quote: |
So For inserting and retrieving a BLOB or CLOB that is held in a database table, only 2 lines of code is required.. |
_________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
alerajeshh |
Posted: Fri Sep 27, 2013 4:58 am Post subject: |
|
|
Acolyte
Joined: 19 Aug 2013 Posts: 55
|
Sorry,my bad...
Thanks for the Correction..  |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|