Yes, T must extend a serializable type, as you said otherwise GWT
can't tell what it might be.  Yes serialization discovery issues are a
pain...right now you just have to stare through the RPC log and try to
divine what happened.

On Apr 12, 4:46 am, Jon Vaughan <jsvaug...@gmail.com> wrote:
> I think the problem is that on this example the type of the payload
> can be anything (it is not required to be serializable); given that
> this is possible, GWT must say, OK, then this type itself cannot be
> serialized (I would like this to fail the compile though somehow)
>
> On Apr 12, 10:27 am, Jon Vaughan <jsvaug...@gmail.com> wrote:
>
> > Hi,
>
> > I have a serialization issue to solve, where a class that is passed to
> > the client, and is marked as IsSerializable, with a default no arg
> > constructor, does not end up in the whitelist.  There are no messages
> > during the gwt compile (at debug level)
>
> > 1.  Does anyone have any thoughts about how I could automatically test
> > for, or fail a build, if this is the case?
> > 2.  Does anyone know how I can get detailed information from GWT about
> > this type of issue?
> > 3.  Anybody got any ideas what the problem itself is? :) (Are there
> > issues with generic types and serialization?  Do I have to explicitly
> > whitelist the variations I want to use somehow?)
>
> > Thanks if anyone has the time to look
>
> > Jon
>
> > My specific problem is as follows: Type
> > 'com.itf.shared.actions.ResponseWithPayload' was not included in the
> > set of types which can be serialized by this SerializationPolicy
>
> > With the following command pattern style interface (where
> > SingleQuestion is itself in the whitelist)
>
> > 1.  The service
>
> > public interface ApplicationService extends RemoteService {
> >     <T extends IResponse> T execute(ICommand<T> action);
>
> > }
>
> > 2. The command
>
> > public class SingleQuestionRequest implements
> > ICommand<ResponseWithPayload<SingleQuestion>>, IsSerializable {
> >     public SingleQuestionRequest() {
> >     }
>
> > }
>
> > 3.  The response class that doesn't end up in the whitelist
>
> > public class ResponseWithPayload<T> implements IResponse,
> > IsSerializable {
> >     private T payload;
>
> >     @SuppressWarnings("unused")
> >     private ResponseWithPayload() {
> >     }
>
> >     public ResponseWithPayload(T payload) {
> >         super();
> >         this.payload = payload;
> >     }
>
> >     public T getPayload() {
> >         return payload;
> >     }
>
> > }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to