XmlSerializationReader errors out trying to create abstract class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jiho Han

    #1

    XmlSerializationReader errors out trying to create abstract class

    I have a web method that accepts an abstract class. The abstract class includes
    an XmlIncludeAttri bute that specifies derived classes.
    Wsdl gets generated fine that includes both schema for the abstract class
    and derived classes mention in XmlIncludeAttri bute list.

    The trouble is when a call is made to the method such as:

    [WebMethod]
    public void Update(Abstract Entity entity) { }

    ..NET framework can't seem to deserialize the derived class that is being
    passed in. I've checked the incoming message and it seems to be fine. It
    include xsi:type attribute and all.
    In debugging, the generated XmlSerializatio nReader seems to be trying to
    create the abstract class.

    In trying to resolve this issue, I've looked to XmlSerializerAs semblyAttribute
    but that only seems to work on the client side (shame). And so, I don't
    know if I can hook into the deserialization pipeline.

    I should mention that I am using XmlSchemaProvid er to publish custom schema
    instead of using the default schema generated by the framework. This generates
    a very different wsdl structure which is giving me headaches. If I can't
    find the solution, I may have to go back to the default schema which sucks
    to be honest.

    Does anyone have suggestions?
    I can provide more info if need be.
    Thanks

    Jiho Han
    Senior Software Engineer
    Infinity Info Systems
    The Sales Technology Experts
    Tel: 212.563.4400 x216
    Fax: 212.760.0540
    jhan@infinityin fo.com




Working...