Invalid hexidecimal characters

J

Jeremy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top