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 » (XML.CDataSection) and MRM

Post new topic  Reply to topic
 (XML.CDataSection) and MRM « View previous topic :: View next topic » 
Author Message
wolstek
PostPosted: Tue Mar 22, 2005 7:29 am    Post subject: (XML.CDataSection) and MRM Reply with quote

Acolyte

Joined: 25 Jun 2001
Posts: 52
Location: Bristol, UK

I am attempting to build an MRM/XML1 output message that contains a tag which has the original xml message as its contents (within a CDATA section).

e.g for example based on input message defined as an MRM/XML1 message set, created by imported schema
<?xml version="1.0"?>
<Message>
<tag1>tag1data</tag1>
<tag2><![CDATA[<Anothermsg>....<Anothermsg>]]>
<tag3>tag3data</tag3>
</Message>

for example , I want to create an output message tha looks like( again defined as an MRM/XML1 message set, created by imported schema )
<OutputMessage>
<outtag1>outtag1</outtag1>
<outtag2>
<![CDATA[<?xml version="1.0"?><Message><tag1>tag1data</tag1><tag2><![CDATA[<Anothermsg>....<Anothermsg>]]><tag3>tag3data</tag3></Message>]]>
</outtag2>
</OutputMessage>

I have tried to create <outtag2> in two different ways

first concatenating the CDATA expression
Code:

DECLARE RootBitStreamOptions INTEGER BITOR(RootBitStream, ValidateNone);
DECLARE workBlob BLOB;
SET workBlob = ASBITSTREAM(InputRoot.MRM OPTIONS RootBitStreamOptions SET 'msgsetid' TYPE 'msgset_name' FORMAT 'XML1');
SET OutputRoot.MRM.outtag2
 = '<![CDATA[' || CAST( workBlob AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding) || ']]>';


second using the (XML.CDataSection) expression
Code:

DECLARE RootBitStreamOptions INTEGER BITOR(RootBitStream, ValidateNone);
DECLARE workBlob BLOB;
SET workBlob = ASBITSTREAM(InputRoot.MRM OPTIONS RootBitStreamOptions SET 'msgsetid' TYPE 'msgset_name' FORMAT 'XML1');
SET OutputRoot.MRM.outtag2.(XML.CDataSection)
 = CAST( workBlob AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


The first way works albeit with the output message with &lt; expressions instead of '<' e.g ( <outtag2>&lt;![CDATA[&lt;........... )
The second way, which would be my preferred way using (XML.CDataSection) results in a parser exception
Quote:

BIP5339E: Mismatch between message tree and logical definition While writing the message, the message tree did not match the logical structure of the message. The problem was encountered while attempting to write element 'RequestMessage' in message set 'E9CR2GC002001'.


I have therefore the following questions.
1. Can you use the (XML.CDataSection) expression in the MRM domain albeit with XML1 format
2. Can you have CDATA within a CDATA
( I did however get the same parser error when trying SET OutputRoot.MRM.outtag2.(XML.CDataSection) = 'dummy'; )
3. Any suggestions on what I might be doing wrong with (XML.CDataSection)
Back to top
View user's profile Send private message
fazz
PostPosted: Wed Mar 23, 2005 8:22 am    Post subject: Reply with quote

Centurion

Joined: 20 Feb 2004
Posts: 144
Location: England

You cannot have nested CDATA sections within an XML message.
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 » (XML.CDataSection) and MRM
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.