XFire

Acegi CollectionType doesn't serialize correctly items that are inherited from a base class

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.2
  • Component/s: Aegis Module
  • Labels:
    None
  • Number of attachments :
    1

Description

class A
{
....
}

class B extends A
{
..
}

@WebMethod
public Collection<A> getCollection()
{
List lst = new ArrayList();
lst.add(new A());
lst.add(new B());

return lst;
}

When a get on the client the collection i expect to see the first element of type A and the second of type B.

I attached here a patch that will fix this problem. It's kind of a hack but I could not figure out a better way to handle this.

Activity

Hide
Dan Diephouse added a comment -

Thanks, but there is a much simpler way to do this - as supplied in the patch in issue XFIRE-583 (which is a duplicate of this issue). I just committed a fix for it in SVN. Cheers

Show
Dan Diephouse added a comment - Thanks, but there is a much simpler way to do this - as supplied in the patch in issue XFIRE-583 (which is a duplicate of this issue). I just committed a fix for it in SVN. Cheers

People

Vote (3)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: