I am Naive in gwt rpc and serialization mechanism, but will try to answer your question.
Whenever you write classes involving an RPC, GWT creates a Serialization Policy File
. The serialization policy file contains a whitelist of allowed types which may be serialized.
In your Service methods, all the types you mention and refer will be automatically added to this list if they implements IsSerializable
. In your case you have used the following two methods,
public String getName();
public Date getJoiningDate();
Here you have used String
and Date
as your return types and hence it is added to your Serialization Policy File
. But in the below method their lies a problem,
public Object getAdditionalDetials(Arraylist<String> ids);
Here you have used ArrayList and String
that is not a problem and they will be added to your whitelist, but the problem is you have mentioned return type as Object
. Here GWT Compiler does not know what type to be added to whitelist or Serialization Policy
and hence it wont pass your RPC call. The solution is use mention a class which implements IsSerializable
instead of mentioning the return type of type Object
.