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 Parsing Error on CDATA section - FileInput Node

Post new topic  Reply to topic
 XML Parsing Error on CDATA section - FileInput Node « View previous topic :: View next topic » 
Author Message
vishysblue
PostPosted: Fri Dec 28, 2018 8:45 am    Post subject: XML Parsing Error on CDATA section - FileInput Node Reply with quote

Newbie

Joined: 12 Sep 2017
Posts: 5

Hi,

I have tried searching this forum for a solution to this problem, but, I have been unsuccessful in finding a solution. Also, infocenter could not help.

Below is the problem:

I am using IIB version 10.0.0.7 installed on z/OS.

I have a message flow which takes in an XML file as input via the FileInput node. I read the file as a BLOB.

The XML contains a tag which has a CDATA section with Base64 encoded data.

Next, I have an RCD node with the XMLNSC parser to parse the received XML. The parsing fails when the CDATA section is reached and I receive below error:

An XML parsing error has occurred while parsing the XML document. The content of elements must consist of well-formed character data or markup.


I have tried modifying the CCSID and Encoding for the FileInput node, but the parsing is never successful.

However, when I use MQInput, instead of FileInput, and parse the same XML using the XMLNSC parser, the XML and the relevant CDATA sections are parsed successfully.

Can you please tell me the reason for the difference in the behavior of the MQInput and FileInput nodes? Also, please help me to solve this issue.

Thanks in advance.
Back to top
View user's profile Send private message
timber
PostPosted: Sat Dec 29, 2018 8:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
when I use MQInput, instead of FileInput, and parse the same XML using the XMLNSC parser, the XML and the relevant CDATA sections are parsed successfully
This is a guess, but it sounds as if the problem is related to the CCSID.
Quote:
I have tried modifying the CCSID and Encoding for the FileInput node, but the parsing is never successful.
You should only need to perform one test. Specify the encoding that the source application is using when it constructs the XML message.
If you are trying to guess the encoding then stop right now because that is never safe. You need to find out what the correct encoding is. That will probably require you to talk to the team that owns the source application.

If you post the full text of the error (you will find it in the user trace, or you might get it from the mqsiexplain command) then we may be able to offer a better diagnosis.
Back to top
View user's profile Send private message
vishysblue
PostPosted: Wed Jan 02, 2019 2:51 am    Post subject: XML Parsing Error on CDATA section - FileInput Node Reply with quote

Newbie

Joined: 12 Sep 2017
Posts: 5

Thanks for the reply !!

I have asked the source system for the encoding. I will update once I receive an answer.

Below is the trace after the XMLNSC parser:

2019-01-02 10:17:18.114242
( §'MQROOT' : 0x5219c0c9c0¤

Code:
(0x01000000:Name  ):Properties = ( §'MQPROPERTYPARSER' : 0x5219b8d6e0¤
   
(0x03000000:NameValue):MessageSet             = '' (CHARACTER)
   
(0x03000000:NameValue):MessageType            = '' (CHARACTER)
   
(0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
   
(0x03000000:NameValue):Encoding               = 785 (INTEGER)
   
(0x03000000:NameValue):CodedCharSetId         = 278 (INTEGER)
   
(0x03000000:NameValue):Transactional          = TRUE (BOOLEAN)
   
(0x03000000:NameValue):Persistence            = TRUE (BOOLEAN)
 
(0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2019-01-02 09:17:01.410' (GMTTIMESTAMP)
   
(0x03000000:NameValue):ExpirationTime         = -1 (INTEGER)
   
(0x03000000:NameValue):Priority               = 0 (INTEGER)
   
(0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)
   
(0x03000000:NameValue):ReplyProtocol          = 'MQ' (CHARACTER)
   
(0x03000000:NameValue):Topic                  = NULL
   
(0x03000000:NameValue):ContentType            = '' (CHARACTER)
   
(0x03000000:NameValue):IdentitySourceType     = '' (CHARACTER)
   
(0x03000000:NameValue):IdentitySourceToken    = '' (CHARACTER)
   
(0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
   
(0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
   
(0x03000000:NameValue):IdentityMappedType     = '' (CHARACTER)
   
(0x03000000:NameValue):IdentityMappedToken    = '' (CHARACTER)
   
(0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
   
(0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
  )
 
(0x01000000:Name  ):MQMD       = ( §'MQHMD' : 0x50dc78c600¤
   
(0x03000000:NameValue):SourceQueue      = 'EXL.CONTRACTFILES.SNP.IN' (CHARACTER)
   
(0x03000000:NameValue):Transactional    = TRUE (BOOLEAN)
   
(0x03000000:NameValue):Encoding         = 785 (INTEGER)
   
(0x03000000:NameValue):CodedCharSetId   = 278 (INTEGER)
   
(0x03000000:NameValue):Format           = '        ' (CHARACTER)
   
(0x03000000:NameValue):Version          = 2 (INTEGER)
   
(0x03000000:NameValue):Report           = 0 (INTEGER)
   
(0x03000000:NameValue):MsgType          = 8 (INTEGER)
   
(0x03000000:NameValue):Expiry           = -1 (INTEGER)
   
(0x03000000:NameValue):Feedback         = 0 (INTEGER)
   
(0x03000000:NameValue):Priority         = 0 (INTEGER)
   
(0x03000000:NameValue):Persistence      = 1 (INTEGER)
   
(0x03000000:NameValue):MsgId            = X'c3e2d840d4d2f0f34040404040404040d5786648c9f935d6' (BLOB)
   
(0x03000000:NameValue):CorrelId         = X'000000000000000000000000000000000000000000000000' (BLOB)
   
(0x03000000:NameValue):BackoutCount     = 0 (INTEGER)
    (0x03000000:NameValue):ReplyToQ         = '                                                ' (CHARACTER)
    (0x03000000:NameValue):ReplyToQMgr      = 'MK03                                            ' (CHARACTER)
   
(0x03000000:NameValue):UserIdentifier   = 'RP00216     ' (CHARACTER)
   
(0x03000000:NameValue):AccountingToken  = X'0000000000000000000000000000000000000000000000000000000000000000' (BLOB)
   
(0x03000000:NameValue):ApplIdentityData = '                                ' (CHARACTER)
   
(0x03000000:NameValue):PutApplType      = 2 (INTEGER)
   

(0x03000000:NameValue):PutApplName      = 'MK03BRK                     ' (CHARACTER)
   
(0x03000000:NameValue):PutDate          = DATE '2019-01-02' (DATE)
   
(0x03000000:NameValue):PutTime          = GMTTIME '09:17:01.410' (GMTTIME)
   
(0x03000000:NameValue):ApplOriginData   = '    ' (CHARACTER)
   
(0x03000000:NameValue):GroupId          = X'000000000000000000000000000000000000000000000000' (BLOB)
   
(0x03000000:NameValue):MsgSeqNumber     = 1 (INTEGER)
   
(0x03000000:NameValue):Offset           = 0 (INTEGER)
   
(0x03000000:NameValue):MsgFlags         = 0 (INTEGER)
   
(0x03000000:NameValue):OriginalLength   = -1 (INTEGER)
  )
 
(0x01000000:Folder):XMLNSC     = ( §'xmlnsc' : 0x50d45b3420¤
Back to top
View user's profile Send private message
timber
PostPosted: Wed Jan 02, 2019 4:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Thanks - but a Trace node is not the same as a 'user trace'.
You need to either
a) run mqsiexplain and specify the BIPnnnn error number or
b) run mqsichangetrace, mqsireadlog, mqsiformatlog to take a user trace
Obviously, you need to put a message through the flow before running mqsireadlog!
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 Parsing Error on CDATA section - FileInput Node
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.