XML serialization of illegal character entities

Discussion in 'ASP .Net Web Services' started by Mike McGranahan, Jul 11, 2006.

  1. Hello,

    My wsdl.exe-generated, ASP.NET 1.1 web service pulls data from the local
    Exchange 2003 store using CDO 2000 and returns it to consumers. CDO
    occasionally returns (char)1, (char)5, and (char)12 from Exchange.
    These are illegal characters in XML 1.0
    (http://www.w3.org/TR/2004/REC-xml-20040204/#charsets), yet .NET still
    serializes them into character entities, e.g.  . When .NET 1.1
    consumers attempt to deserialize this, they receive an XmlException,
    e.g. "'', hexadecimal value 0x05, is an invalid character. Line 1,
    position 326." referring to the first appearance of an illegal character
    entity. I don't believe I have altered the default serialization behavior.

    According to an MSDN article, the XmlTextReader used by the ASP.NET Web
    Services deserializer has its Normalization property set to false, which
    causes the deserializer to throw the exception (See "Deserializing
    Invalid XML" here:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp)

    Is it possible to exchange strings with these characters using ASP.NET
    1.1 Web Services? Have I configured something problematically? Is it
    possible to change the XML deserializer behavior? Or is it possible to
    configure the XML serializer to generate XML that will not cause this
    behavior in the deserializer? Are there other relevant considerations
    or recommendable techniques that could be helpful?

    Thanks for any assistance.

    --
    Michael McGranahan
    Programmer/Analyst
    College Information Services, UCLA
    Mike McGranahan, Jul 11, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William Brogden
    Replies:
    1
    Views:
    8,326
    Manoj S. P.
    Jun 30, 2003
  2. Replies:
    3
    Views:
    1,002
  3. Dimitri Ognibene
    Replies:
    4
    Views:
    758
    Dimitri Ognibene
    Sep 2, 2006
  4. Ramunas Urbonas
    Replies:
    1
    Views:
    376
    Dino Chiesa [Microsoft]
    Jul 27, 2004
  5. Jim Higson
    Replies:
    3
    Views:
    210
    Eric Amick
    Jul 25, 2004
Loading...

Share This Page