I'm trying to build a WCF service that implements the following interface.
public interface IWebService
void DoWork(BaseClass argument);
I also have the following classes:
public class BaseClass
private string elements;
public class SuperClass : BaseClass
public string Name
But when I consume the WCF service with the following client, it results in an error:
static void Main()
WebserviceClient _client = new WebserviceClient();
SuperClass argument = new SuperClass();
argument.Name = "Joe";
There was an error while trying to serialize parameter http:
I know I could add the type 'SuperClass' to the list of knowntypes. But that is not my intention. I want to build a lot of wrapper classes around this baseClass that are easy to use for me/other users. But these wrapper classes are nothing more than BaseClasses.
The above example code is a simplified version of my real project.
Does anyone know what I have to do to make this work?