Monday, June 13, 2016

Re: Newbie Help - how to retrieve data from another website?

On Monday, June 13, 2016 at 9:40:34 AM UTC+2, Hans Dampf wrote:
Hi everyone,

opening an URL like returns a XML-file. I don't have access to the server.
Now i am trying to receive this data and give it out in my gwt-app.
I have tried modifying the code from this tutorial : but i failed miserably.
Can anyone kindly give me a hint on what to implement / how to do it properly in order to read the XML and put its content in an object that i can modify / give out in my gwt-app?
Thanks in advance!

If the other server sends CORS headers in the response, then you can just use XMLHttpRequest or RequestBuilder:
Otherwise, you'll have to make the request from your server (acting as a proxy) to workaround the same-origin policy.
JSON-P, despite what its name suggests, is simply about retrieving a JavaScript and having it executed in the current web page using a <script> tag; so it (obviously) won't work for XML.

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment