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 using ResetContentDescriptor node

Post new topic  Reply to topic
 XML parsing error using ResetContentDescriptor node « View previous topic :: View next topic » 
Author Message
angka
PostPosted: Thu Feb 19, 2009 7:01 pm    Post subject: XML parsing error using ResetContentDescriptor node Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

I encountered XML parsing error ("Invalid character (Unicode:0x1A)") error while using a ResetContentDescriptor node to parse a MQ message body(MQSTR) to xml.

Below is the detail on how the message is generated.
1) User input data using web broswer and the data is generated into xml document.
2) It was then deserialize to string and insert into MSSQL server as varchar.
3) A .net application picks up from the database and insert the data(payload in string) into MQ body. CCSID set to 437 and Encoding to 546.
4) The message is put to remote queue and sends over to another QM and the Message Broker picks up.
5) And it throws the message to SYSTEM.DEAD.LETTER.QUEUE with the above mentioned error.

Both the QM is using Windows server 2003. The web application is using asp.net.

Think there is some invalid character with the user input. But I can't seem to find the invalid character. Somehow rfhutil can view the message and parsed it to xml(maybe just for viewing). I looked at the character in hex but none seems to be a problem.

I tried to google for "invalid character unicode 0x1A" but still not very sure what is wrong.

Anyone knows the solution to this??

Thank you
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Feb 19, 2009 10:10 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

In XML V1.0, the Unicode 0X'1A' (substitute) is not a valid character..
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
angka
PostPosted: Thu Feb 19, 2009 10:12 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

But how to type 0x1A as the data is input by user?

Thanks
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Feb 19, 2009 10:56 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

This is not a WMB error, this is normal XML parsing error. You can ask sending system to not to send this invalid character...
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
angka
PostPosted: Thu Feb 19, 2009 11:11 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

I realised there is a 0x7F character (Del char) but how does the user enter this? or is it because user enter same valid character but after deserialize and insert to database, the char changes? e.g. when char "<" in xml tag deserialize to string, it becomes something else.

Thanks.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Fri Feb 20, 2009 4:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

angka wrote:
But how to type 0x1A as the data is input by user?

In Unicode, and ASCII-based character sets, 0x1A is the 'SUBSTITUTE' character. The functions that convert a string from one character set to another often use the SUBSTITUTE character to replace any characters that aren't defined in the target character set.

When converting between ASCII-based character sets, non-ASCII characters (hex >= 80) are vulnerable to substitution, and even moreso when converting with the wrong CCSID.
Back to top
View user's profile Send private message
angka
PostPosted: Sat Feb 21, 2009 9:52 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

But all the systems involve are using Windows OS 2000 or 2003. so for the .net application to set the CCSID to 437 shld not be any problem right?

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Feb 22, 2009 9:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

angka wrote:
Hi,

But all the systems involve are using Windows OS 2000 or 2003. so for the .net application to set the CCSID to 437 shld not be any problem right?

Thanks

Remember that the native form for .Net is Unicode (CCSID 1200).
So if you want to use ccsid 437 you need to convert your content before writing it to the message.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
angka
PostPosted: Sun Feb 22, 2009 6:34 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

fjb_saper wrote:
angka wrote:
Hi,

But all the systems involve are using Windows OS 2000 or 2003. so for the .net application to set the CCSID to 437 shld not be any problem right?

Thanks

Remember that the native form for .Net is Unicode (CCSID 1200).
So if you want to use ccsid 437 you need to convert your content before writing it to the message.


Hi,

Are you suspecting tt the user input some character which is represented by 2 bytes(CCSID 1200) but when the .net application converts it to 1 byte(CCSID 437), it become 0x1A(SUB Char)?

If so how do i convert the content all to 1 byte before writing to the message?

Thanks
Back to top
View user's profile Send private message
angka
PostPosted: Sun Feb 22, 2009 7:31 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

fjb_saper wrote:
angka wrote:
Hi,

But all the systems involve are using Windows OS 2000 or 2003. so for the .net application to set the CCSID to 437 shld not be any problem right?

Thanks

Remember that the native form for .Net is Unicode (CCSID 1200).
So if you want to use ccsid 437 you need to convert your content before writing it to the message.


Hi,

Are you suspecting tt the user input some character which is represented by 2 bytes(CCSID 1200) but when the .net application converts it to 1 byte(CCSID 437), it become 0x1A(SUB Char)?

If so how do i convert the content all to 1 byte before writing to the message?

Thanks
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Feb 22, 2009 11:04 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Quote:
If so how do i convert the content all to 1 byte before writing to the message?


You don't.... Broker does it for you.

When the output message is built at the output node it is formatted according to how you have setup the CCSID. That tells the builder to format in say Ebcidic, Kanji, ISO8859-1 or whatever.
If you get that right then the output will be in the correct Characterset.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
angka
PostPosted: Sun Feb 22, 2009 11:40 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

The problem is the message is converted to CCSID 437 before it is send over to the broker QM. And then the message body is already corrupted.

Thanks
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 using ResetContentDescriptor 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.