gwt - Using List<Serializable> in a RPC call?
Posted
by Garagos
on Stack Overflow
See other posts from Stack Overflow
or by Garagos
Published on 2010-06-17T07:49:39Z
Indexed on
2010/06/17
7:53 UTC
Read the original article
Hit count: 219
I have a RPC service with the following method:
public List<Serializable> myMethod(TransactionCall call) {...}
But I get a warning when this method is analyzed, and then the rpc call fails
Analyzing 'my.project.package.myService' for serializable types Analyzing methods: public abstract java.util.List<java.io.Serializable> myMethod(my.project.package.TransactionCall call) Return type: java.util.List<java.io.Serializable> [...] java.io.Serializable Verifying instantiability (!) Checking all subtypes of Object wich qualify for serialization
It seems I can't use Serializable for my List... I could use my own interface instead (something like AsyncDataInterface, wich implements the Serializable interface) but the fact is that my method will return a list custom objects AND basic objects (such as Strings, int....).
So my questions are:
- Is it a standart behaviour? (I can't figure out why I can't use this interface in that case)
- Does anyone have a workaround for that kind of situation?
© Stack Overflow or respective owner