Hi Guys -
I'm trying to write my own custom transport solution for client /
server communication so that I can make my project work cross-site. I
would like to serialize objects on the client side, send them to my
Jetty server using my own custom transport, and then deserialize those
objects on the server side for handling.
I've written the client code, and it seems to be working. It looks
like this:
(not that NetworkPacket implements IsSerializable, and EventService is
a dummy RemoteService)
public String serializePacket(NetworkPacket np)
{
String retVal = null;
SerializationStreamFactory fact = (SerializationStreamFactory)
GWT.create(EventService.class);
SerializationStreamWriter theSW = fact.createStreamWriter();
try
{
theSW.writeObject(np);
retVal = theSW.toString();
}
catch(Exception e)
{
e.printStackTrace();
}
return retVal;
}
This code seems to be working (it produces a reasonable-looking
string). I can't test if it deserializes though because the
serialization is asymmetric. The part I can't figure out though, is
how to deserialize on the server side. The closest I've found is the
ServerSerializationStreamReader class, which I found while poking
through the GWT source. It seems to be undocumented though, and its in
the "com.google.gwt.user.server.rpc.impl" package, which tells me it's
probably not intended for use by my code. How am I supposed to do
this?
Any help will be greatly appreciated!
-Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---