It's not a secret anymore!*
The moose likes GWT and the fly likes Calling RPC present in different server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Calling RPC present in different server" Watch "Calling RPC present in different server" New topic
Author

Calling RPC present in different server

Satyanarayana Raju Sagi
Greenhorn

Joined: Nov 10, 2010
Posts: 2


Hi

Can we call a gwt rpc which is not part of the current application?

The scenario is that i had a GWT application say APP1 running on Tomcat Server. And i had one GWT application say APP2 running on JBOSS server.
Now let us say that we had an rpc call say GetDataFromServer.getSpecificData(userId) in APP2. (GetDataFromServer is the synchronous interface and getSpecificData() is the method.

Now can i call this getSpecificData() rpc from APP1?

Thanks in advance.
Raju
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

Welcome to the Ranch.

If you insist on using RPC to switch calls to a different server, then I think you are lucked out. However, GWT does provide you with client side HTTP APIs. Check out http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html#DevGuideHttpRequests

Considering the same origin policy restrictions, I personally would use the server side to switch calls.
Client->originating server->different server and reverse route back.

You might also want to check out http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_SOP


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Satyanarayana Raju Sagi
Greenhorn

Joined: Nov 10, 2010
Posts: 2
Dear Maneesh,

Thank you for the info.
I had already taken a glance at the HTTP Requests of the GWT.
I am checking if there is any other alternative solution.

Satyanarayana Raju S
 
jQuery in Action, 2nd edition
 
subject: Calling RPC present in different server