Hessian ReadMap错误

时间:2014-06-06 20:11:06

标签: c# hessian

我正在维护一个使用Hessian的Silverlight应用程序。

我注意到当我们返回大量数据时,反序列化代码会在方法中引发错误:

ReadMap(AbstractHessianInput abstractHessianInput, Object result)

与期待:

ArgumentException occurred: 

Object of type 'TO.ConflictTO' cannot be converted to type 'TO.IdTO'.

我最初认为这是由于返回数据的大小,因为当我们减少数据时,错误没有出现。

反序列化的对象结构格式为:

public class Report
{
    public Conflict[] Conflicts {get;set;}
}

public class Conflict
{
    public PlayerDetails Player { get; set; }
    public PlayListDetails[] ConflictingPlaylists{ get; set;}
}

public class PlayerDetails 
{
    public int Id { get; set; }
    public string Name { get; set; }
    public bool Enabled { get; set; }
    public string HostName { get; set; }
    public string Password { get; set; }
    public int Port { get; set; }
    public string UserName { get; set; }
}

public class PlayListDetails
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public PlayListType Kind { get; set; }
    public string PublishFileName { get; set; }
    public bool Looped { get; set; }
    public string AutoRestrictions { get; set; }
    public PlayListPlayMethod PlayMethod { get; set; }
}

我不确定错误来自哪里?

0 个答案:

没有答案