HighTechTalks DotNet Forums  

Invalid hexidecimal characters

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Invalid hexidecimal characters in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jeremy
 
Posts: n/a

Default Invalid hexidecimal characters - 07-12-2007 , 11:53 AM






I have a web service returning a class. Most of the time ther serialization
and deserialization of the class works perfection. One of the properties of
the class is a string which could contain characters (0x08 for example)
which are not valid in xml. When this is the case, the web service encodes
the character as  like it should. I can see this when I view the
source of the web methods output.

When I consume this web service from a web app, the web app returns an error
"There is an error in XML document (39, 13)." with an inner exception of
"'', hexadecimal value 0x08, is an invalid character. Line 39, position
13."

It seems to me the serialization of the class to xml by the web service is
happening fine, but it's the deserialization of the xml back to a class by
the web app where it's failing. Why is this? I would think that the 
encoded characters should be deserializable. Any way to fix or work around
this? I can't base64encode the string in my web service.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.