Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 2nd, 2006, 08:35 PM
Jiho Han
Guest
 
Posts: n/a
Default XmlSerializationReader errors out trying to create abstract class

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
jhan@infinityinfo.com
www.infinityinfo.com



 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles