Hi all, I'm working on XFire (on Grails) to expose a simple web service. The GaUser class has several subclasses (e.g. employee, admin, etc). The problem is that from this service, I only get the GaUser object, without the fields in the subclass.
GaUser findUserByUserId( String userId ){
GaUser user = GaUser.findByUserId( userId )
// at this point the user is an instance of subclass
return user
// only the superclass is returned to the SOAP client.
}
In Grails I can't use the 'def' type, so the objects are all cast to the superclass. Any hints? Is there a way to make this work in a more dynamic way?
Cheers!