2

I'm really impressed with the functionality and capability found in the GWT async RPC mechanism which defines

 com.google.gwt.user.client.rpc.RemoteService 
 com.google.gwt.user.server.rpc.RemoveServiceServlet

Due to the extreme limitations in the GAE hosting environment, I'm needing to bridge requests from a GAE server to another non-GAE server.

Is there a way to use the same DTOs and async RPC mechanism I'm using with the browser->server when communicating server->server ?

axtavt
  • 239,438
  • 41
  • 511
  • 482
Stevko
  • 4,345
  • 6
  • 39
  • 66
  • 1
    Found a posting in the "Related" sidebar that seems to be a similar question. http://stackoverflow.com/questions/2116870/how-can-i-call-a-gwt-rpc-method-on-a-server-from-a-non-gwt-but-java-gapplicatio Thanks Trung for contributed a link to RPC testing toolkit that may be a solution - http://www.gdevelop.com/w/blog/2010/01/10/testing-gwt-rpc-services/ – Stevko Feb 23 '10 at 01:06
  • 's suggestion looks good to me. Worst case, you could just forward the raw request and response as the payloads themselves don't have host-specific information. – ShabbyDoo Mar 22 '10 at 00:43

1 Answers1

0

When you write a GWT/App-Engine App you compile and load the .class files as well as the comiled Javascript to one source. A client comes along downloads your Javascript and GWT does it's magic between the client and server.

Let's assume that now you want to forward some of the RPC calls to another server. You would need to make sure that the Serialization Ids were identical. You now have a problem that will give you fits when you don't keep every thing exactly in sync.

My recommendation to tou would be to use JSON, XML or just text for the calls that you need to forward. It now becomes easy to use the URL Fetch service of GAE.

Romain Hippeau
  • 24,113
  • 5
  • 60
  • 79