I have a web method that accepts an abstract class. The abstract class includes
an XmlIncludeAttribute that specifies derived classes.
Wsdl gets generated fine that includes both schema for the abstract class
and derived classes mention in XmlIncludeAttribute list.
The trouble is when a call is made to the method such as:
[WebMethod]
public void Update(AbstractEntity 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 XmlSerializationReader seems to be trying to
create the abstract class.
In trying to resolve this issue, I've looked to XmlSerializerAssemblyAttribute
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 XmlSchemaProvider 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
jh**@infinityinfo.com
www.infinityinfo.com