Hello everybody, I have encountered a very weird problem with shared
code between client and server.

The client is GWT compatible Java code and the server is pure Java.

We have created a serializable class, Request (public class Request
implements IsSerializable) which we want to use to exchange data
between client and server code. The class was included in the .rpc
file generated by the compiler, so it's indeed serializable. Moreover,
inside this class we have a method that sets the object for this
request; inside this method, an encoding protocol is obtained via
object's class name (if this is a list, we typecast it to List and get
the first element's class name - if the size is != 0). The code for
all protocols is compatible with GWT, since it compiles successfully,
the request object arrives at the servlet and the response back.

However, writing any of the following lines of code has no effect:
request.setObject (o)
or
request.getObject ()

It acts as if they don't exist, in either client/server code. I have
print-lined before and after the request in servlet, and all prints
BEFORE the request sets a list of objects work, BUT all after DON'T;
this would indicate that setting an object is a problem, BUT then, the
function exists successfully, since client code receives the request.
You would ask 'if you get a new request back, what's the problem?'

The problem is handling this request, since I have agents that handle
the object inside this request,
so ... request.getObject () - again, something breaks, because I used
Window.alert("...") just before getting the object and again one just
after. The second one doesn't get executed, but no errors, no
exceptions!!

I should mention that hosted mode works just fine and I am able to
display the object (so it's handled correctly).

Is there any problem if I use a shared package/classes (within same
project) for both client and server code? How would I detect this
problem since I don't get any errors?

Sorry for the long post, I hope you have the patience to read it :)
--~--~---------~--~----~------------~-------~--~----~
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-Toolkit@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to