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 » Add CDATA to Output

Post new topic  Reply to topic
 Add CDATA to Output « View previous topic :: View next topic » 
Author Message
ashritha
PostPosted: Wed Jan 11, 2006 2:22 pm    Post subject: Add CDATA to Output Reply with quote

Voyager

Joined: 25 Jul 2005
Posts: 85

Hi,

I am trying to add a dynamically built XML(with esql not from the InputRoot) as a CData Section in the Output XML, but have problems doing that.

I have the dynamically build XML in an environment.variables tree and I have to send this as CDataSection in the output. I referred the forums to find a solution but none explain building it from environment tree.

My esql code is:

SET OutputRoot.XMLNS.soapenv:Envelope.soapenv:Body.p504:publicationRequest.(XML.CDataSection) = CAST(ASBITSTREAM(Environment.Variables.Message.XML.publishRequestContent OPTIONS FolderBitStream) AS CHAR
CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


But this does not help. My Output looks like this

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
</soapenv:Body>
</soapenv:Envelope>

Can anyone please help me fix this?

Thanks in advance.
Back to top
View user's profile Send private message
mgk
PostPosted: Wed Jan 11, 2006 4:20 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Well for a start have you created an XMLNS parser in the Environment? If not look up the CREATE stament with a DOMAIN clause in the docs and in other posts by me (mgk) in this forum.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
ashritha
PostPosted: Thu Jan 12, 2006 8:15 am    Post subject: Reply with quote

Voyager

Joined: 25 Jul 2005
Posts: 85

Hello mqk,

Thanks for your response. I tried parsing the XML data in theEnvironment into XMLNS using CREATE statement, but that did not help.

Actually, I should not convert the XML in the Environment to an XMLNS file according to the logic I had to implement here, but as an example, I tried doing but did not help.

I tried another way(may be not the best solution) to get this to work.

I added another compute node following the first one and sent the XML in the Environment as an input to the second compute node and executed the following command and things worked fine.

SET OutputRoot.XMLNS.soapenv:Envelope.soapenv:Body.p504:publicationRequest.(XML.CDataSection) = CAST(ASBITSTREAM(InputRoot.XML.publicationRequest OPTIONS FolderBitStream) AS CHARACTER
CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding);


I know this statement works with InputRoot but couldn't find a way to make it work with Environment tree.

Any ideas on sending the Environment as a CDataSection are welcome.

Thanks
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Jan 12, 2006 8:26 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

The ASBITSTREAM will only work is there is a parser to work on. Normally OutputRoot will create parsers for you when you reference OutputRoot.{parsername} but the Environment tree will not. Therefore if you do ASBITSTREAM on the Environment when there is no parser you will get an empty bitstream/blob back as the elements belong to the root parser who does not serialize elements. Therefore, you have to create a parser in the Environment, of type XML, XMLNS or whatever parser you want / need using the CREATE statement with a DOMAIN clause which specifies your ParserName (XML or whatever) then create your elements UNDER the parser you just created.

If you still have problems getting this to work, please post your full esql.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » Add CDATA to Output
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.