0

我正在维护一个使用 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; }
}

我不确定错误来自哪里?

4

0 回答 0