You're using the term "server/domain", perhaps that muddies the waters.

You might want to make the request from the client to server A. Server A
then makes a request of Server B. Server A collects the answer and
forwards/reformats it for the client.

For example, server A is a custom application, server B is a web API exposed
via SOAP. My client application posts a transaction to server A which posts
a SOAP request to server B. Server B acts on the request and responds to
server A. Server A takes the response and returns the it to the client. All
this happens in a sub 10 second time window.

I'm not sure it's worth the overhead to include server B in the mix. There
are reasons to include server B (e.g. mashups), but I don't see that in the
question.

On Fri, Sep 17, 2010 at 1:48 PM, Sunny <[email protected]> wrote:

> Thanks but I need more clarification so let me rephrase my question
> which is  server/domain A has its own portal developed using GWT and
> server/domain B is not GWT generated code and needs to exposes a API
> to do CRUD operations from server/domain A so my question is if the
> API on server/domain B is REST then I can make REST calls from server/
> domain A ?
>
> OR
>
> Use Cross-Origin Resource Sharing which means serverB/domain B has to
> change their HTTP headers.
>
> On Sep 17, 9:21 am, "marius.andreiana" <[email protected]>
> wrote:
> > On Sep 17, 8:45 am, Sunny <[email protected]> wrote:> In step 2, on
> the server, using gwt can I make REST API calls to
> > > server B in domain B?
> >
> > Yes.
> >
> > On server/domain A you have
> > * gwt compiled files, including project_nocache.js
> > * assets such as css/images
> > * container.html which loads domainb.com/project.html in an iframe.
> >
> > On server/domain B you have
> > * project.html, which loads domaina.com/project/project_nocache.js
> > * APIs
> >
> > Clients can access either domainb.com/project.html or domaina.com/
> > container.html
> >
> >
> >
> > > Thanks
> >
> > > On Sep 16, 9:57 pm, "marius.andreiana" <[email protected]>
> > > wrote:
> >
> > > > On Sep 17, 6:27 am, Sunny <[email protected]> wrote:> Greetings,
> > > > >                    I need to fetch data from a remote server which
> is
> > > > > not located in the same domain as the GWT application. My
> > > > > understanding is that as per same origin policy I might not be able
> to
> > > > > use REST. Is there a simple workaround or SOAP is the only
> > > > > alternative ?
> >
> > > > SOAP still requires your client app to make AJAX calls to server, so
> > > > SOP restrictions would be the same. If the server it's not Java, I
> > > > strongly recommend REST.
> >
> > > > Workarounds:
> > > > 1. Use CORShttp://
> en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing
> > > > * use a proxy server if you can't modify the http headers of the
> > > > server you are accessing
> > > > * IE8 & 9 supports this, but via a proprietary XDomain object. So GWT
> > > > has to be modified to use XDomain instead of XHR for IE, or you can
> > > > recommend any other browser, which are standards based, to your
> users.
> > > > 2. Deploy GWT compiled files to the server, if possible. You'd only
> > > > need a .html loaded in an iframe.  The HTML loads the rest of JS/CSS
> > > > from your server.
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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.

Reply via email to