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 » Convert to ASBITSTREAM

Post new topic  Reply to topic
 Convert to ASBITSTREAM « View previous topic :: View next topic » 
Author Message
Gama
PostPosted: Tue Apr 19, 2005 1:48 am    Post subject: Convert to ASBITSTREAM Reply with quote

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>&lt;MRM.M.C34&gt;&lt;MRM.F.ZIDOEXT&gt;&lt;ZIDOEXT_STRUCID&gt.........&lt;MRM.M.C34&gt;&lt;
</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
View user's profile Send private message
kirani
PostPosted: Tue Apr 19, 2005 9:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Gama
PostPosted: Wed Apr 20, 2005 12:15 am    Post subject: Reply with quote

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
View user's profile Send private message
alexey
PostPosted: Fri Apr 22, 2005 1:06 pm    Post subject: Reply with quote

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
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 » Convert to ASBITSTREAM
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.