Desperate please help with XmlSerializer, IXmlSerializable and XmlSchemaProvider

Discussion in 'ASP .Net Web Services' started by peter.moss@gmail.com, Apr 10, 2006.

  1. Guest

    Please, please help me - I am desperate.

    I have a scenario where I need to send out my object schema in the
    WSDL. After hunting I found many posts (on MSDN and google) explaining
    that the way to do this is by using the poorly documented
    IXmlSerializable interface and the XmlSchemaProvider attribute.

    I've done this and it works great - my Schema now comes out correctly
    in the WSDL.

    Unfortunately, the side effect is that de/serialization no longer
    works. Why? Because I have to reimiplement the ReadXml() and
    WriteXml() methods manually. But I don't want to - I like the way the
    ..NET framework serizlizes and deserializes objects. I've seen the code
    in Reflector - it is HUGE. So how do I pass the power back to .NET to
    do the de/serialization?

    Though, as time has gone on I have discovered that no validation occurs
    and the only way to do this is to use the ReadXml() method to validate
    the incoming XML. So how do I do this (I guess with an
    XmlValidatingReader)?

    So two questions really:
    1) How to hand back power to .NET for de/serizliation using the
    IXmlSerializable interface
    2) How to do validation in the ReadXml method and then pass the
    responsibility back to .NET for deserialization.

    Please, please, please help me - I am at my whits end.
     
    , Apr 10, 2006
    #1
    1. Advertisements

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. Big Dave
    Replies:
    4
    Views:
    1,325
    CJ Taylor
    Sep 28, 2004
  2. Dave Navarro

    DESPERATE FOR HELP! Please Read!

    Dave Navarro, Aug 19, 2004, in forum: HTML
    Replies:
    2
    Views:
    455
    Auric__
    Aug 27, 2004
  3. KK
    Replies:
    2
    Views:
    1,070
    Big Brian
    Oct 14, 2003
  4. Replies:
    1
    Views:
    499
    RedGrittyBrick
    Jan 2, 2008
  5. Jiho Han

    XmlSchemaProvider w/ abstract class

    Jiho Han, Jul 29, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    567
    Jiho Han
    Jul 29, 2006
  6. Frederik Vanderhaegen

    webservice and IXMLSerializable

    Frederik Vanderhaegen, Oct 31, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    275
    Frederik Vanderhaegen
    Oct 31, 2006
  7. Dave Navarro

    DESPERATE FOR HELP! Please Read!

    Dave Navarro, Aug 19, 2004, in forum: ASP General
    Replies:
    2
    Views:
    216
    Auric__
    Aug 27, 2004
  8. Tank
    Replies:
    5
    Views:
    232
    McKirahan
    Feb 12, 2004
Loading...