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 » How to diagnose 'XML Parsing Errors have occurred' error

Post new topic  Reply to topic
 How to diagnose 'XML Parsing Errors have occurred' error « View previous topic :: View next topic » 
Author Message
jfrankman
PostPosted: Thu Dec 17, 2009 6:44 pm    Post subject: How to diagnose 'XML Parsing Errors have occurred' error Reply with quote

Apprentice

Joined: 18 Jun 2009
Posts: 36

I have created a message flow that is supposed to recieve messages from an external company and send a response back. However, when the message lands in the MQInput node the XML parsing fails and when I debug the flow, the message tree displays: "XML Parsing Errors have occurred". I am not an expert when it comes to character encoding and such and could use some help figuring this thing out. Through some investigation here is what I have found thus far:

1. Besides the payload, the MQMD headers look fine, only the xml message itself cannot be parsed.
2. The ccsid in the MQMD header is 1200, but I think this might not match the actual encoding used to create the xml.
3. RFHUtil seams to parse the message just fine. On the data tab, if I select XML the xml displays fine. If I select "Text" the xml characters appear but there is a "." dot signifying null between each character.
4. When I send the message through a trace node and output the message, the hex of the failing message has null "00" between each character. This is the only difference between my own test messages (which work) and the actual messages coming from the external company.

Due to the above I believe the problem is related to character encoding, but am not sure how to proceed. I do know that the sending environment is AIX and my own receiving environment is Windows. Here are my questions:

A. How can I tell what the actual encoding of the xml message is?
B. Once I do find out what the encoding in what do I need to do so the message flow can parse the XML properly? Is setting the correct CCSID in the MQMD header sufficient, or do I need to modify my message flow?

Below is the dump of a working message (my test msg), and a failing message (note that I had to change the MQInput node to use the BLOB parser so I could output the full message to the trace):

Failing Message (Blob format):
Code:
( ['MQROOT' : 0xa5943c8]
  (0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0xc35f40]
    (0x03000000:NameValue):MessageSet             = '' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 437 (INTEGER)
    (0x03000000:NameValue):Transactional          = TRUE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2009-12-18 00:01:51.340' (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' : 0x925a700]
    (0x03000000:NameValue):SourceQueue      = 'NEXUS.SAFELITE.POLICY.SEARCH.RQ' (CHARACTER)
    (0x03000000:NameValue):Transactional    = TRUE (BOOLEAN)
    (0x03000000:NameValue):Encoding         = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId   = 437 (INTEGER)
    (0x03000000:NameValue):Format           = 'MQSTR   ' (CHARACTER)
    (0x03000000:NameValue):Version          = 2 (INTEGER)
    (0x03000000:NameValue):Report           = 3 (INTEGER)
    (0x03000000:NameValue):MsgType          = 1 (INTEGER)
    (0x03000000:NameValue):Expiry           = -1 (INTEGER)
    (0x03000000:NameValue):Feedback         = 0 (INTEGER)
    (0x03000000:NameValue):Priority         = 0 (INTEGER)
    (0x03000000:NameValue):Persistence      = 0 (INTEGER)
    (0x03000000:NameValue):MsgId            = X'414d51205742524b5f514d202020202013aa274b2000453c' (BLOB)
    (0x03000000:NameValue):CorrelId         = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):BackoutCount     = 0 (INTEGER)
    (0x03000000:NameValue):ReplyToQ         = 'CoverageQ                                       ' (CHARACTER)
    (0x03000000:NameValue):ReplyToQMgr      = 'ESL_DEV                                         ' (CHARACTER)
    (0x03000000:NameValue):UserIdentifier   = 'jfrankman   ' (CHARACTER)
    (0x03000000:NameValue):AccountingToken  = X'16010515000000b644e4232b3d0176828ba6289504000000000000000000000b' (BLOB)
    (0x03000000:NameValue):ApplIdentityData = '                                ' (CHARACTER)
    (0x03000000:NameValue):PutApplType      = 11 (INTEGER)
    (0x03000000:NameValue):PutApplName      = 'k\Utilities\ih03\rfhutil.exe' (CHARACTER)
    (0x03000000:NameValue):PutDate          = DATE '2009-12-18' (DATE)
    (0x03000000:NameValue):PutTime          = GMTTIME '00:01:51.340' (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:Name):BLOB       = ( ['none' : 0x36db020]
    (0x03000000:NameValue):UnknownParserName = 'MQSTR' (CHARACTER)
    (0x03000000:NameValue):BLOB              = X'3c003f0078006d006c002000760065007200730069006f006e003d00220031002e0030002200200065006e0063006f00640069006e0067003d
0022005500540046002d00380022003f003e003c00410043004f0052004400200078006d006c006e0073003a007800730069003d00220068007
400740070003a002f002f007700770077002e00770033002e006f00720067002f0032003000300031002f0058004d004c0053006300680065006
d0061002d0069006e007300740061006e0063006500220020007800730069003a006e006f004e0061006d00650073007000610063006500530
06300680065006d0061004c006f0063006100740069006f006e003d00220043006c00690065006e00740049006e00710075006900720079002e
0078007300640022003e003c005300690067006e006f006e00520071003e003c005300690067006e006f006e0050007300770064003e003c00
5300690067006e006f006e0052006f006c006500430064003e004100670065006e0074003c002f005300690067006e006f006e0052006f006c00
6500430064003e003c004300750073007400490064003e003c0043007500730074004c006f00670069006e00490064003e004c006f006700690
06e00490044003c002f0043007500730074004c006f00670069006e00490064003e003c002f004300750073007400490064003e003c004300750
07300740050007300770064003e003c0045006e006300720079007000740069006f006e005400790070006500430064003e004e004f004e0045
003c002f0045006e006300720079007000740069006f006e005400790070006500430064003e003c0050007300770064003e005000610073007
30077006f00720064003c002f0050007300770064003e003c002f00430075007300740050007300770064003e003c002f005300690067006e006
f006e0050007300770064003e003c0043006c00690065006e007400440074003e0032003000300037002d00310031002d003000380054003100
34003a00340033003a00320032002e003500350033002d0035003a00300030003c002f0043006c00690065006e007400440074003e003c00430
07500730074004c0061006e00670050007200650066003e0065006e003c002f0043007500730074004c0061006e00670050007200650066003e
003c0043006c00690065006e0074004100700070003e003c004f00720067003e0053004100460045004c004900540045003c002f004f0072006700
3e003c004e0061006d0065003e0053006100660065006c006900740065003c002f004e0061006d0065003e003c00560065007200730069006f
006e003e0031002e0030003c002f00560065007200730069006f006e003e003c002f0043006c00690065006e0074004100700070003e003c00
2f005300690067006e006f006e00520071003e003c0049006e0073007500720061006e0063006500530076006300520071003e003c00520071
005500490044003e00370036004600370038003600390041002d0034003000300044002d0038003700350035002d0033003600410031002d
003300350034003400360034003900330035004300450037003c002f00520071005500490044003e003c0050006f006c00690063007900490
06e007100520071003e003c00520071005500490044003e00370036004600370038003600390041002d0034003000300044002d003800370
0350035002d0033003600410031002d003300350034003400360034003900330035004300450037003c002f00520071005500490044003e
003c005400720061006e00730061006300740069006f006e005200650071007500650073007400440074003e0032003000300037002d0031
0031002d00300038005400310034003a00340033003a00320032002e003500350033002d0035003a00300030003c002f005400720061006e
00730061006300740069006f006e005200650071007500650073007400440074003e003c00430075007200430064003e005500530044003c
002f00430075007200430064003e003c00410073004f006600440074003e0032003000300037002d00310031002d00300031003c002f004100
73004f006600440074003e003c0050006f006c0069006300790049006e00710049006e0066006f003e003c005000610072007400690061006c0
050006f006c006900630079003e003c0050006f006c006900630079004e0075006d006200650072003e0031003200330034003500360037003c
002f0050006f006c006900630079004e0075006d006200650072003e003c0050006f006c00690063007900560065007200730069006f006e00
3e0031003c002f0050006f006c00690063007900560065007200730069006f006e003e003c004c004f004200430064003e004100550054004f00
50003c002f004c004f004200430064003e003c002f005000610072007400690061006c0050006f006c006900630079003e003c002f0050006f006c
0069006300790049006e00710049006e0066006f003e003c002f0050006f006c0069006300790049006e007100520071003e003c002f0049006e
0073007500720061006e0063006500530076006300520071003e003c002f00410043004f00520044003e00' (BLOB)
  )
)


Here is the same xml only successful:
Code:
( ['MQROOT' : 0xa5943c8]
  (0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0xc35f40]
    (0x03000000:NameValue):MessageSet             = '' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 437 (INTEGER)
    (0x03000000:NameValue):Transactional          = TRUE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2009-12-18 00:04:24.150' (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' : 0x925a700]
    (0x03000000:NameValue):SourceQueue      = 'NEXUS.SAFELITE.POLICY.SEARCH.RQ' (CHARACTER)
    (0x03000000:NameValue):Transactional    = TRUE (BOOLEAN)
    (0x03000000:NameValue):Encoding         = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId   = 437 (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      = 0 (INTEGER)
    (0x03000000:NameValue):MsgId            = X'414d51205742524b5f514d202020202013aa274b20058104' (BLOB)
    (0x03000000:NameValue):CorrelId         = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):BackoutCount     = 0 (INTEGER)
    (0x03000000:NameValue):ReplyToQ         = '                                                ' (CHARACTER)
    (0x03000000:NameValue):ReplyToQMgr      = 'WBRK_QM                                         ' (CHARACTER)
    (0x03000000:NameValue):UserIdentifier   = 'jfrankman   ' (CHARACTER)
    (0x03000000:NameValue):AccountingToken  = X'16010515000000b644e4232b3d0176828ba6289504000000000000000000000b' (BLOB)
    (0x03000000:NameValue):ApplIdentityData = '                                ' (CHARACTER)
    (0x03000000:NameValue):PutApplType      = 11 (INTEGER)
    (0x03000000:NameValue):PutApplName      = 'k\Utilities\ih03\rfhutil.exe' (CHARACTER)
    (0x03000000:NameValue):PutDate          = DATE '2009-12-18' (DATE)
    (0x03000000:NameValue):PutTime          = GMTTIME '00:04:24.150' (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:Name):BLOB       = ( ['none' : 0x36db020]
    (0x03000000:NameValue):UnknownParserName = '' (CHARACTER)
    (0x03000000:NameValue):BLOB              = X'3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223
f3e0d0a3c41434f524420786d6c6e733a7873693d22687474703a2f2f7777772e77332e6f72672f323030312f584d4c536368656d612d
696e7374616e636522207873693a6e6f4e616d657370616365536368656d614c6f636174696f6e3d22436c69656e74496e717569727
92e787364223e0d0a203c5369676e6f6e52713e0d0a20203c5369676e6f6e507377643e0d0a2020203c5369676e6f6e526f6c6543643
e4167656e743c2f5369676e6f6e526f6c6543643e0d0a2020203c4375737449643e0d0a202020203c437573744c6f67696e49643e4c6
f67696e49443c2f437573744c6f67696e49643e0d0a2020203c2f4375737449643e0d0a2020203c43757374507377643e0d0a202020
203c456e6372797074696f6e5479706543643e4e4f4e453c2f456e6372797074696f6e5479706543643e0d0a202020203c507377643e
50617373776f72643c2f507377643e0d0a2020203c2f43757374507377643e0d0a20203c2f5369676e6f6e507377643e0d0a20203c436
c69656e7444743e323030372d31312d30385431343a34333a32322e3535332d353a30303c2f436c69656e7444743e0d0a20203c4375
73744c616e67507265663e656e3c2f437573744c616e67507265663e0d0a20203c436c69656e744170703e0d0a2020203c4f72673e5
34146454c4954453c2f4f72673e0d0a2020203c4e616d653e536166656c6974653c2f4e616d653e0d0a2020203c56657273696f6e3e31
2e303c2f56657273696f6e3e0d0a20203c2f436c69656e744170703e0d0a203c2f5369676e6f6e52713e0d0a203c496e737572616e636
553766352713e0d0a20203c52715549443e37364637383639412d343030442d383735352d333641312d333534343634393335434537
3c2f52715549443e0d0a20203c506f6c696379496e7152713e0d0a2020203c52715549443e37364637383639412d343030442d383735
352d333641312d3335343436343933354345373c2f52715549443e0d0a2020203c5472616e73616374696f6e5265717565737444743e
323030372d31312d30385431343a34333a32322e3535332d353a30303c2f5472616e73616374696f6e5265717565737444743e0d0a
2020203c43757243643e5553443c2f43757243643e0d0a2020203c41734f6644743e323030372d31312d30313c2f41734f6644743e0d0a
2020203c506f6c696379496e71496e666f3e0d0a202020203c5061727469616c506f6c6963793e0d0a
20202020203c506f6c6963794e756d6265723e313233343536373c2f506f6c6963794e756d6265723e0d0a
20202020203c506f6c69637956657273696f6e3e313c2f506f6c69637956657273696f6e3e0d0a
20202020203c4c4f4243643e4155544f503c2f4c4f4243643e0d0a202020203c2f5061727469616c506f6c6963793e0d0a
2020203c2f506f6c696379496e71496e666f3e0d0a20203c2f506f6c696379496e7152713e0d0a
203c2f496e737572616e636553766352713e0d0a3c2f41434f52443e' (BLOB)
  )
)


[admin]edited for readability[/admin]
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 17, 2009 7:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

The XML you're describing sounds like it's UTF-16 - 2 bytes to a character. This would indicate that the CCSID of 1200 on the message is wrong. It would certainly help if whoever's sending the message used the correct details in the header.

There are a number of discussions in the forum you may find helpful on this matter.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jfrankman
PostPosted: Thu Dec 17, 2009 7:32 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Jun 2009
Posts: 36

What should I search for in the forum to find the discussions. Generally speaking, when dealing with this problem will the solution invovle converting the message using ESQL, or adjusting the settings on the MQInput node or MQ Queue/Channel settings?
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 18, 2009 3:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Vitor: Code page 1200 is UTF-16.

jfrankman:
Quote:
I am not an expert when it comes to character encoding and such and could use some help figuring this thing out.
Sorry - you need to be an expert. It's not hard, but you do need to learn the basics in order to survive in today's computing environment.
Please read the links which I posted in this thread: http://www.mqseries.net/phpBB2/viewtopic.php?t=51940
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 18, 2009 5:47 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kimbert wrote:
Vitor: Code page 1200 is UTF-16.


This coffee's been spiked....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 18, 2009 6:21 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
This coffee's been spiked....
Christmas cheer comes early.
You *could* see it as a positive thing that you don't know the names and numbers of all the Unicode code pages without looking them up. I would.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Dec 18, 2009 7:40 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

The first line of the BLOB you posted is: < ? x m l v e r s i o n = " 1 . 0 " e n c o d i n g = " U T F - 8 " ? >

Which shows that the encoding in the XML document does not match the actual encoding of the message... Also your MQMD that you posted shows a ccsid of 437 which is clearly not correct for the message you posted...
_________________
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
Vitor
PostPosted: Fri Dec 18, 2009 8:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kimbert wrote:
You *could* see it as a positive thing that you don't know the names and numbers of all the Unicode code pages without looking them up. I would.


Bless you.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 18, 2009 8:12 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mgk wrote:
Also your MQMD that you posted shows a ccsid of 437 which is clearly not correct for the message you posted...


Exactly what I was getting at. Except I got it highly confused.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Sat Dec 19, 2009 2:43 pm    Post subject: Re: How to diagnose 'XML Parsing Errors have occurred' error Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Before posting, please use the 'Preview' button, and either line-wrap or truncate the irrelevant bits of excessively long words within a line.

Or, after posting, please use the 'Edit' button, and try again.
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 » How to diagnose 'XML Parsing Errors have occurred' error
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.