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 » Converting CDATA TO XMLNSC

Post new topic  Reply to topic
 Converting CDATA TO XMLNSC « View previous topic :: View next topic » 
Author Message
vanshulchawla_target
PostPosted: Wed Oct 06, 2010 4:03 am    Post subject: Converting CDATA TO XMLNSC Reply with quote

Apprentice

Joined: 19 May 2010
Posts: 25

I need to convert CDATA section of below message to XMLNSC.

-------------------
<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"
xmlns:wscoor="http://schemas.xmlsoap.org/ws/2004/10/wscoor">
<soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<wsat-ext:imported xmlns:wsat-ext="http://www.ibm.com/ws-tx/wsat/2007/12"/>
</soapenv:Header>
<soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<p561:getGuestOrderListResponse xmlns:p561="http://ejb.rpc.webservices.services.interop.yantra.com">
<getGuestOrderListReturn xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<Order AuthorizationExpirationDate="2010-07-15T04:18:38-06:00"
BillToID="Northern Fulfillment Services Company"
CarrierAccountNo="" CarrierServiceCode=""
ChargeActualFreightFlag="N" CustCustPONo="" ..........
--------------------------------------------


I am trying this code

DECLARE inCCSID INT InputProperties.CodedCharSetId;
DECLARE inEncoding INT InputProperties.Encoding;
DECLARE inBitStream BLOB ASBITSTREAM(InputRoot.XMLNSC.soapenv:Envelope.soapenv:Body.p561:getGuestOrderListResponse.getGuestOrderListReturn, inEncoding, inCCSID);

SET OutputRoot.XMLNSC.Message = '';
CREATE LASTCHILD OF OutputRoot.XMLNSC.Message PARSE(inBitStream, inEncoding, inCCSID);


I am getting error at ASBITSTREAM piece.Am i referring the tree correctely.If yes, can you please suggest any other way to parse this CDATA
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 06, 2010 4:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's already a bitstream.

It's also illegal for a CDATA section to contain an <?xml declaration.
Back to top
View user's profile Send private message
vanshulchawla_target
PostPosted: Wed Oct 06, 2010 4:21 am    Post subject: Reply with quote

Apprentice

Joined: 19 May 2010
Posts: 25

Thanks Jeff.Its a 3rd paty XML so we cant change it but will speak to them ragarding this.
Please also let me know how to create XMLNSC structure out of that CDATA part?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 06, 2010 4:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You said you were getting an error trying to call asbitstream.

It's already a bitstream in the cdata section.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Oct 06, 2010 6:54 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I am getting error at ASBITSTREAM piece.
In future, please either
a) quote the error or
b) don't mention it at all

Quote:
can you please suggest any other way to parse this CDATA
Yes. Don't bother with a CAST statement. Just use CREATE...PARSE...DOMAIN 'XMLNSC' on the value of the tag.
Back to top
View user's profile Send private message
vanshulchawla_target
PostPosted: Wed Oct 06, 2010 7:58 pm    Post subject: Reply with quote

Apprentice

Joined: 19 May 2010
Posts: 25

Thanks.Completed that piece yesterday only but forgot to respond.
My bad.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Wed Oct 06, 2010 9:12 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

mqjeff wrote:
It's also illegal for a CDATA section to contain an <?xml declaration.

Not quite. It's illegal for a CDATA section to contain ']]>'. Any other sequence of character data is legal.
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 » Converting CDATA TO XMLNSC
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.