web service can't serialize an interface

后端 未结 3 1116
小鲜肉
小鲜肉 2021-01-04 21:36

I have an interface like so:

public interface IDocument : ISerializable
{
    Boolean HasBeenUploaded { get; set; }
    void ISerializable.GetObjectData(Seri         


        
3条回答
  •  一个人的身影
    2021-01-04 22:22

    +1 for firedfly, however it should be noted that the XmlInclude attribute may be appended to the web service class rather than to each and every method (or base type, which is also an option). I have tested it and the code is generated well, keeping the inheritance structure.

    I got this from the comments section of the same blog he referred to, so credit goes to the OP.

    BTW this isn't a comment to firedfly's post because I don't have enough reputation to comment

提交回复
热议问题