I have an abstract class. Let\'s call it Lifeform. It looks something like:
public abstract class Lifeform {
public virtual int Legs { get; set; }
pu
Ran into the exact same problem with VB.NET. Using the XMLInclude attribute, while ugly, did the trick.
From what I've read, you can include the XMLInclude attribute on the web method returning the object rather than in the base class. Still not pretty, but might appeal to you a little more than putting derived class names in the base class. I haven't tried it out, but I think you can do something like this.
[WebMethod]
[XmlInclude(typeof(LifeForm))]
public Human GetHuman()
{
return new Human();
}