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" <marius.andrei...@gmail.com>
wrote:
> On Sep 17, 8:45 am, Sunny <sravip...@gmail.com> 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" <marius.andrei...@gmail.com>
> > wrote:
>
> > > On Sep 17, 6:27 am, Sunny <sravip...@gmail.com> 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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to