Author |
Message
|
Arushi |
Posted: Mon Feb 26, 2007 5:18 am Post subject: Converting XML data into CLOB data |
|
|
Novice
Joined: 12 Jan 2007 Posts: 21
|
Hi,
I need to insert XML data from compute node into a DB2 database as CLOB. How can i achieve this? Do i convert this into Character or send as BLOB? And how to retrieve the same from the Database?
Thanks,
Arushi |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 26, 2007 5:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You will use ASBITSTREAM to flatten the message tree from the XMLNS or XMLNSC parser (or the MRM-XML parser) into a ... stream of bits... that will be your CLOB.
You will use CREATE FIELD with the PARSE option to turn a stream of bits into a parsed message tree. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
au@kosa |
Posted: Tue Feb 27, 2007 4:32 am Post subject: |
|
|
 Centurion
Joined: 04 Jan 2007 Posts: 103 Location: pune
|
Have you tried using Reset Content Descripter List with Message domain as BLOB. _________________ Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate |
|
Back to top |
|
 |
Arushi |
Posted: Tue Feb 27, 2007 5:14 am Post subject: |
|
|
Novice
Joined: 12 Jan 2007 Posts: 21
|
Hi,
I don't have any message set, i need the data in XML format only. While retrieveing data from Databse , how do i give the CREATE FIELD paramter without the PARSE clause?
Thanks,
Arushi |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 27, 2007 5:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why don't you want to use the PARSE clause? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Arushi |
Posted: Tue Feb 27, 2007 5:31 am Post subject: |
|
|
Novice
Joined: 12 Jan 2007 Posts: 21
|
Hi,
Sorry, i meant i don't have message set .Are you suggesting using PARSE Clause with Domain as XMLNSC? Are there any examples i can refer to?
Thanks,
Arushi |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 27, 2007 5:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Where have you looked for examples? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
au@kosa |
Posted: Tue Feb 27, 2007 11:06 pm Post subject: |
|
|
 Centurion
Joined: 04 Jan 2007 Posts: 103 Location: pune
|
Quote: |
I don't have any message set, i need the data in XML format only. While retrieveing data from Databse , how do i give the CREATE FIELD paramter without the PARSE clause? |
1. Create a xsd for the record set you are getting back from the database for the given query. Put all fields optional but take care of repeating elements.
2. From this xsd create a message set.
3. If transformation required you can further add mapping node.
Regards,
Amit Upadhyaya _________________ Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 28, 2007 1:31 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
au@kosa: Please explain your previous post. I don't understand what you are suggesting, or how it will help Arushi to solve his problem. |
|
Back to top |
|
 |
au@kosa |
Posted: Wed Feb 28, 2007 3:38 am Post subject: |
|
|
 Centurion
Joined: 04 Jan 2007 Posts: 103 Location: pune
|
There can be better way than i am suggesting, but for a novice a believe that it gives a easy implementation.
I understand you do not have a message set and xsd for the database response.
In this case you need to create a one response xsd (you can use Altova XML SPY). You need understanding of Database data fields which you are using in your esql query. While creating the response xsd, you are not sure whether you will get the data in your recordset (it depends on the availability of data in your database). So, suggest you better to put all fields in your response xsd as optional. I remember that oracle return data as an XML (I believe this is a database configurable property).
Regards,
Amit Upadhyaya _________________ Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 28, 2007 4:17 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Are you suggesting using PARSE Clause with Domain as XMLNSC |
Yes, he is. Search this forum for examples. You can do the same with ASBITSTREAM, before you ask. |
|
Back to top |
|
 |
|