Wcf SavableDataObjectBase

Jun 8, 2012 at 6:41 PM

I have wcf service operation contract public AfaDto GetAfaDto(short id).And in the client side service ref im get the object type System.Data.DataSet.
Why not AfaDto class?
 Here is the dto class
 public class AfaDto : SavableDataObjectBase<AfaDto>, IAfa
    protected AfaDto(SerializationInfo info, StreamingContext context)
            : base(info, context)
            Id = (short)info.GetValue("Id", typeof(short));
            Kulcs = (decimal)info.GetValue("Kulcs", typeof(decimal));


Jun 9, 2012 at 9:12 AM

This is because there is no contract descriptor. The client is unknown to WCF services (might be a device, .NET code, or PHP, or whatever). They don't know about the DataObjectBase, so it is hard to force a DataObjectBase.

What you can do is deserialize the xml yourself, then you can create the DOB. We want to implement a automatic descriptor in the future, but they are static (which makes it hard to implement a descriptor per class automatically), but we will find a way in the future. But don't expect this within 2 months.

Jun 9, 2012 at 4:44 PM

Thank you for your answer.