Question

I got some wcf service. I got also:

[DataContract]
public abstract class BaseClass
{

}

[DataContract]
public class ClassA : BaseClass
{
    [DataMember]
    //some data members
}

[DataContract]
public class ClassB : BaseClass
{
    [DataMember]
    //some data members
}

I got method

[OperationContract]

public void SendData(BaseClass[] data);

So i need to pass Array of ClassA and ClassB to my service. How should i mark my classes to make it visible in service metadata, and overall make that right?

Was it helpful?

Solution

Look into KnownTypeAttribute.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top