OK, some more tests:

I defined java class (in main classpath) as follows
public class X implements Serializable {
        protected Map values = new HashMap();
}

Now, if I define its emulated version with same code, X can be
(de)serialized through RPC, but if fails e.g. if I define X in my
emulating package as
public class X implements Serializable {
}

So does it mean that emulated and original versions of classes must
have same methods and fields signature? (it can be pain for me since
original class has a lot of complex methods). If so, if class Y is
referenced from X as method parameter, should its emulated version
have same methods and fields signature too? If this is also true, does
this mean that if I want to emulate one class from a library, there
are great chances that i will have to emulate whole library?

On 5 мар, 12:10, Andrey <razumovsky.and...@gmail.com> wrote:
> Hello,
>
> I'm using GWT 2.0 and now playing with custom emulation and
> serializers.
> I've got a complex class CDO which has many imports and cannot be
> explicitly RPC-serialized in any way. So, I created its emulation with
> only few methods and added <super-source> to my gwt.xml. Also I
> created CDO_CustomFieldSerializer (which didn't help anyway). Now,
> serializing the object goes just fine (and my custom serializer in
> invoked) but deserializing never happens with exception:
> Caused by: com.google.gwt.user.client.rpc.SerializationException:
> foo.CDO/122702870
>         at
> com.google.gwt.user.client.rpc.impl.SerializerBase.check(SerializerBase.java:
> 161)
>         at
> com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:
> 138)
>          ...and so on
>
> I suspect the problem's root is that my emulation class' and original
> class source code are different, but the exception is too
> uninformative and I've been unable to find a solution.
> Why this is not working and what are the laws of creating emulation
> source codes?
>
> Thanks!

-- 
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