|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Convert to ASBITSTREAM |
« View previous topic :: View next topic » |
Author |
Message
|
Gama |
Posted: Tue Apr 19, 2005 1:48 am Post subject: Convert to ASBITSTREAM |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
Hello again.
I'm trying to convert the input message to output,
DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.XML.DATA.TS = CAST(ASBITSTREAM("InputRoot"."XML"."MRM.M.C34.LI"."MRM.M.C34") AS CHARACTER CCSID 1208);
Output Example:
<DATA>
<TS><MRM.M.C34><MRM.F.ZIDOEXT><ZIDOEXT_STRUCID>.........<MRM.M.C34><
</TS>
</DATA>
When i put in debu i receive the folow message
2328 UserTrace BIP2538I: Node 'TESTE_IN.Compute4': Evaluating expression 'CAST(ASBITSTREAM(InputRoot.XML.MRM.M.C34.LI.MRM.M.C34) AS CHARACTER CCSID 1208)' at (14, 30).
UserTrace BIP2538I: Node 'TESTE_IN.Compute4': Evaluating expression 'ASBITSTREAM(InputRoot.XML.MRM.M.C34.LI.MRM.M.C34)' at (14, 35).
2328 ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
2328 ParserException BIP5005E: No valid body of the document could be found.
There should be one, and only one, top level element of type Element or EmptyElement and this is not the case for the current message.
Check that the XML message being passed in is a well formed XML message that adheres to the XML specification and that only one of the above exists as a child of the root.
Can any one help me?
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Tue Apr 19, 2005 9:55 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What is your input XML message? It seems you are sending invalid XML message to the message flow, so the parser is failing when parsing this message. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Gama |
Posted: Wed Apr 20, 2005 12:15 am Post subject: |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
kirani wrote: |
What is your input XML message? It seems you are sending invalid XML message to the message flow, so the parser is failing when parsing this message. |
Hello
This is my input message
<MRM.M.C34.LI>
<MRM.M.C34>
<MRM.F.ZIDOEXT>
<ZIDOEXT_STRUCID>IDO</ZIDOEXT_STRUCID>
<ZIDOEXT_VERSIONEXT>1</ZIDOEXT_VERSIONEXT>
<ZIDOEXT_STRUCTLENGTH>0304</ZIDOEXT_STRUCTLENGTH>
<ZIDOEXT_CREDAT>20050419</ZIDOEXT_CREDAT>
<ZIDOEXT_CRETIM>093114</ZIDOEXT_CRETIM>
</MRM.F.ZIDOEXT>
<MRM.F.C34_E2EDL20002>
<E2EDL20002_VBELN>4542000139</E2EDL20002_VBELN>
<E2EDL20002_LIFEX>4542000139 14/04/2005</E2EDL20002_LIFEX>
</MRM.F.C34_E2EDL20002>
<MRM.F.C34_Z2EDLTR000>
<Z2EDLTR000_TPLST>PT</Z2EDLTR000_TPLST>
<Z2EDLTR000_SHTYP>YH01</Z2EDLTR000_SHTYP>
<Z2EDLTR000_TPBEZ>20050415 4542000139</Z2EDLTR000_TPBEZ>
<Z2EDLTR000_TIME_APP>093114</Z2EDLTR000_TIME_APP>
</MRM.F.C34_Z2EDLTR000>
<MRM.R.C34_E2EDL18>
<MRM.F.C34_E2EDL18>
<E2EDL18_QUALF>CHG</E2EDL18_QUALF>
</MRM.F.C34_E2EDL18>
<MRM.F.C34_E2EDL18>
<E2EDL18_QUALF>PIC</E2EDL18_QUALF>
</MRM.F.C34_E2EDL18>
<MRM.F.C34_E2EDL18>
<E2EDL18_QUALF>PGI</E2EDL18_QUALF>
</MRM.F.C34_E2EDL18>
</MRM.R.C34_E2EDL18>
<MRM.R.C34_E2EDT13001>
<MRM.F.C34_E2EDT13001>
<E2EDT13001_QUALF>006</E2EDT13001_QUALF>
<E2EDT13001_ISDD>20050415</E2EDT13001_ISDD>
</MRM.F.C34_E2EDT13001>
<MRM.F.C34_E2EDT13001>
<E2EDT13001_QUALF>010</E2EDT13001_QUALF>
<E2EDT13001_NTANF>20050415</E2EDT13001_NTANF>
<E2EDT13001_NTANZ>143553</E2EDT13001_NTANZ>
</MRM.F.C34_E2EDT13001>
</MRM.R.C34_E2EDT13001>
<MRM.R.C34_E2EDL24005>
<MRM.C.C34_E2EDL24005>
<MRM.F.C34_E2EDL24005>
<E2EDL24005_POSNR>000001</E2EDL24005_POSNR>
<E2EDL24005_MATNR>F015642</E2EDL24005_MATNR>
<E2EDL24005_LFIMG>5.000</E2EDL24005_LFIMG>
</MRM.F.C34_E2EDL24005>
<MRM.F.C34_E2EDL19>
<E2EDL19_QUALF>QUA</E2EDL19_QUALF>
</MRM.F.C34_E2EDL19>
</MRM.C.C34_E2EDL24005>
<MRM.C.C34_E2EDL24005>
<MRM.F.C34_E2EDL24005>
<E2EDL24005_POSNR>000002</E2EDL24005_POSNR>
<E2EDL24005_MATNR>F015643</E2EDL24005_MATNR>
<E2EDL24005_LFIMG>3.000</E2EDL24005_LFIMG>
</MRM.F.C34_E2EDL24005>
<MRM.F.C34_E2EDL19>
<E2EDL19_QUALF>QUA</E2EDL19_QUALF>
</MRM.F.C34_E2EDL19>
</MRM.C.C34_E2EDL24005>
<MRM.C.C34_E2EDL24005>
<MRM.F.C34_E2EDL24005>
<E2EDL24005_POSNR>000003</E2EDL24005_POSNR>
<E2EDL24005_MATNR>F027646</E2EDL24005_MATNR>
<E2EDL24005_LFIMG>2.000</E2EDL24005_LFIMG>
</MRM.F.C34_E2EDL24005>
<MRM.F.C34_E2EDL19>
<E2EDL19_QUALF>QUA</E2EDL19_QUALF>
</MRM.F.C34_E2EDL19>
</MRM.C.C34_E2EDL24005>
<MRM.C.C34_E2EDL24005>
<MRM.F.C34_E2EDL24005>
<E2EDL24005_POSNR>000004</E2EDL24005_POSNR>
<E2EDL24005_MATNR>F029546</E2EDL24005_MATNR>
<E2EDL24005_LFIMG>4.000</E2EDL24005_LFIMG>
</MRM.F.C34_E2EDL24005>
<MRM.F.C34_E2EDL19>
<E2EDL19_QUALF>QUA</E2EDL19_QUALF>
</MRM.F.C34_E2EDL19>
</MRM.C.C34_E2EDL24005>
</MRM.R.C34_E2EDL24005>
</MRM.M.C34>
</MRM.M.C34.LI>
The segment "MRM.M.C34" are repeatable. |
|
Back to top |
|
 |
alexey |
Posted: Fri Apr 22, 2005 1:06 pm Post subject: |
|
|
 Acolyte
Joined: 18 Dec 2003 Posts: 62 Location: Israel
|
I think you need to sepcify FolderBitStream option.
In the help it is written that a default option is to use RootBitStream & ValidateNone and the Root parser looks for a single root element XML message to be found under your reference, but the subtree you're referencing has multiple children.
Look at the "Working with XML messages and bit streams" in the WBIMB Info center.
Try to add options:
Code: |
SET result = ASBITSTREAM(cursor OPTIONS FolderBitStream); |
Alexey. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|