Answered on SO: http://stackoverflow.com/a/19427197/116472

On Thursday, October 17, 2013 8:46:43 AM UTC+2, Fanny Wong wrote:
>
> Hi everyone, I just started using GWT a couple days ago, and currently 
> trying to download an Excel file from a different domain onto the GWT 
> servers and then parse it later on. I seen suggestions on doing it through 
> Request builder and RPCs but so far haven't gotten any of them to work. 
> Also I have read about the same origin policy and hence resorted to using 
> JsonpRequestBuilder. However, I'm not too sure what I'm missing here, 
> because I keep getting a Time out exception every time I try to access the 
> file. Any guidance and help would be much appreciated :) Thanks.
>
> Error:
>
> SEVERE: com.google.gwt.jsonp.client.TimeoutException: Timeout while 
> calling 
> ftp://webftp.vancouver.ca/OpenData/xls/new_food_vendor_locations.xls
>
> private final String url = 
> "ftp://webftp.vancouver.ca/OpenData/xls/new_food_vendor_locations.xls";;
>
> private Logger logger = Logger.getLogger("DataRequest.java");
>
> public void retrieveFile() {
>     JsonpRequestBuilder builder = new JsonpRequestBuilder();
>
>     builder.requestObject(url,
>             new AsyncCallback<ExcelFileJavascriptObject>() {
>
>                 @Override
>                 public void onFailure(Throwable caught) {
>                     // TODO Auto-generated method stub
>                     logger.severe(caught.getMessage());
>                     logger.severe(caught.toString());
>                 }
>
>                 @Override
>                 public void onSuccess(ExcelFileJavascriptObject result) {
>                     // TODO Auto-generated method stub
>                     Window.alert(result.toString());
>                 }
>             });
> }
>
> public void onModuleLoad() {
>     retrieveFile();
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to