Hi sam,
Sorry for the delay, but yesterday was a off in France (not working
day 11 novembre )
It's just because you don't provide a SerializationPolicyProvider
when decoding the GWT RPC payload.
Then GWT is unable to load the 1.4+ serialization policies file ( *.gwt.rpc).
So GWT fall back to the 1.3 default serialization policies which need
GWT serializable object to implement IsSerializable.
Change:
RPC.decodeRequest(requestString, remote_service.getClass())
By:
RPC.decodeRequest(requestString, remote_service.getClass(), *this*);
*This* should be your dispatch servlet (implementing
RemoteServiceServlet which is a (implements)
SerializationPolicyProvider ...
And it's should work as you expect.
Also remember that GWT seriablisable object need to appear in a
service signature...
Please let me know, if I'm clear and if it's works.
Regards.
PS: You could give a look to my implementation:
http://code.google.com/p/net-orcades-spring/source/browse/trunk/orcades-spring-gwt/src/main/java/net/orcades/spring/gwt/SpringGWTRemoteServlet.java
Line 76
On Tue, Nov 11, 2008 at 7:15 AM, Sam <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> I am trying to integrate GWT with the spring framework and we are able
> to implement it successfully. The only question that remains unsolved
> is of GWT serilization and deserilization issue. We have several
> already exsisting classes which are actually remote and implements
> Serilizable interface. However GWT seriliztion policy expects all the
> remote classes to implement isSerilizable interface. (Even google's
> official blog says we should prefer to implement isSerizable)
> Implementing Serilizable interface works when my service class extends
> from RemoteServiceServlet . However I don't want to be dependant on
> GWT and hence I have removed that dependancy there by using spring
> capabilities. (Implementing HandlerAdapter interface) and then after I
> do all the stuff which RemoteServiceServlet does manually. (getting
> request in the form of String , decoding the request, encoding the
> response and so on ) . For this to work properly I have created a new
> class (MySerilizationPolicy) which actually have the same code as that
> of RemoteServiceServlet and it implements SerializationPolicyProvider
> and I invoke the API decodeRequest as follows
>
> RPCRequest rpcRequest = RPC.decodeRequest(requestString,
> remote_service.getClass(),
>
> MySerilizationPolicy.getInstance(servletContext, request, response));
> What u guys think of it ?? Is it the best way to deal with this kinda
> situation .Or is there any other alternative. I have observed that if
> our service class (the class on server side) extends from
> RemoteServiceServlet then even though the remote class implements
> Serilizable interface (insted of isSerizable) everthing works fine. So
> whats that thing , which the RemoteServiceServlet must be doing so as
> to make the class work eventhough it implements Serizable interface
> insted of isSerizable interface.
> If I remove the dependancy over GWT there by NOT implementing
> RemoteServiceServlet , I get the error message and when I implement
> isSerilizabel interface everything works fine as expected.
> Any link, white paper will be greatly appriciated ,
> Thanks in advance.
>
>
>
> >
>
--
Si l'ignorance peut servir de consolation, elle n'en est pas moins illusoire.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---