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 » UCS-2 XML Parsing UQestion

Post new topic  Reply to topic
 UCS-2 XML Parsing UQestion « View previous topic :: View next topic » 
Author Message
TonyD
PostPosted: Thu Oct 16, 2003 10:40 pm    Post subject: UCS-2 XML Parsing UQestion Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

We have a .NET application that puts a UCS-2 (CCSID '1200') XML message on to a WIN2k WBI 5 broker input queue. The MQInput node specifies Message Domain 'XML'. There is no byte order mark (x'FFFE') preceding the data. The WBI XML parser rejects the message:
Quote:

ParserException BIP5004E: XML parsing error (Invalid document structure) encountered on line 1 column 1 while parsing element .

When I insert the byte order mark, the message is parsed correctly.
Is there any other way, besides preceding the message data with a byte order mark, to get the WBI parser to correctly handle the message? I wondered about specifying an encoding declaration, but it did not have any effect.
Back to top
View user's profile Send private message Send e-mail
jfluitsm
PostPosted: Sun Oct 19, 2003 5:50 am    Post subject: Reply with quote

Disciple

Joined: 24 Feb 2002
Posts: 160
Location: The Netherlands

When UCS-2 (sub-set of UTF-16) is used there should be a byte-order-mark, otherwise the XML is not valid (as the error tells you).
See http://www.w3.org/TR/REC-xml#charencoding.
_________________
Jan Fluitsma

IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6
Back to top
View user's profile Send private message Send e-mail
TonyD
PostPosted: Sun Oct 19, 2003 3:07 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Thank you for that reference. It does however appear to indicate that an encoding declaration is an acceptable alternative. I had already tried to my message with 'encoding=ISO-10646-UCS2' annd no byte order mark, but parsing failed. Should the WBI parser have been able to handle this alternative?
Back to top
View user's profile Send private message Send e-mail
jfluitsm
PostPosted: Mon Oct 20, 2003 11:32 am    Post subject: Reply with quote

Disciple

Joined: 24 Feb 2002
Posts: 160
Location: The Netherlands

Although not clear from the XML reference, I think the declaration has always to be in UTF-8 or UTF-16, otherwise there is no way to interpret the encoding. Without the BOM the parser can't be sure whether big-endian or little-endian UTF-16 is used.
_________________
Jan Fluitsma

IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6
Back to top
View user's profile Send private message Send e-mail
TonyD
PostPosted: Mon Oct 20, 2003 3:07 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

That makes sense...thanks Jan.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » UCS-2 XML Parsing UQestion
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.