Hi,
I'm trying to send a non-trivial object back from an RPCRequestServlet. I can pass back a string (and cast it to a String on the client side), but can't seem to send a simple class or a map. I really just want to pass back data in a more organized way than munging it all together in a string.
I've tried an object, Serializable object, a LinkedHashMap, but with no luck. I can pass a LinkedHashMap from the client to the server in a RPCRequest, and it gets nicely casted to a LinkedMap. But I'm not sure how to go the other way.
The server docs indicate that I should be able to pass back pretty much any old object, as long as it's fairly primitive types, arrays, a map, etc.
Can anyone share an example of what exact type they instantiate and pass as the "data" in the RPCResponse on the server, and then how they re-constitute it into a usable object on the server side (i.e. exact type they cast it to on the server)?
Thanks much!
I'm trying to send a non-trivial object back from an RPCRequestServlet. I can pass back a string (and cast it to a String on the client side), but can't seem to send a simple class or a map. I really just want to pass back data in a more organized way than munging it all together in a string.
I've tried an object, Serializable object, a LinkedHashMap, but with no luck. I can pass a LinkedHashMap from the client to the server in a RPCRequest, and it gets nicely casted to a LinkedMap. But I'm not sure how to go the other way.
The server docs indicate that I should be able to pass back pretty much any old object, as long as it's fairly primitive types, arrays, a map, etc.
Can anyone share an example of what exact type they instantiate and pass as the "data" in the RPCResponse on the server, and then how they re-constitute it into a usable object on the server side (i.e. exact type they cast it to on the server)?
Thanks much!
Comment