nobody, really? tell me at least if it is too obvious, or not applyable, etc....
On Sep 14, 4:28 pm, dao <dao.ho...@gmail.com> wrote: > nobody wants to help me? > > On 9 sep, 23:28, dao <dao.ho...@gmail.com> wrote: > > > > > hello, > > > A very easy question for you web policy expert guys: > > > I want to make an application that uses data from anexternalURL. It > > is an atom feed (could be an RSS one) from flickr. I just want to > > fetch some photos from my flickr account. The typical URL is > > > feed://api.flickr.com/services/feeds/photos_public.gne? > > id=28208...@n00 > > > you can see that it is an different origin URL, so it is not applyable > > with GWT requestbuilder, isn't it > > (seehttp://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_SOP) > > > Therefore, what's the best practice to use those data in my GWT app? I > > did not catch if there is a workaround, if I have to use GWT an other > > way? > > > I have nevertheless tried the request buider with this URL. I was > > surprised of the behaviour: > > > response.getStatusCode() is 0 (why 0?, not an HTTP valid code, isn't > > it? > > response.getStatusText() is empty. > > response.getText() is empty. > > > what does it mean? please give me a clue !!! > > > below the piece of code I wrote: > > > public FlickrFeedAnalyser(final String url, final > > FlexTableFillerCallback callback) { > > photos = new ArrayList<Photo>(); > > RequestBuilder builder = new RequestBuilder > > (RequestBuilder.GET, > > url); > > System.out.println(url); > > try { > > Request response = builder.sendRequest(null, > > new RequestCallback() > > { > > public void onError(Request request, > > Throwable exception) { > > System.out.println > > (exception); > > } > > public void onResponseReceived(Request > > request, > > Response response) { > > Document feed = XMLParser.parse > > (response.getText()); > > if (response.getText().length() > > <10) { > > DialogBox error = new > > DialogBox(); > > error.setText > > ("code:"+response.getStatusCode()+" - > > msg"+response.getStatusText()); > > error.show(); > > } > > NodeList entries = > > feed.getElementsByTagName("entry"); > > if (entries.getLength()==0) > > System.out.println > > (feed); > > for (int i = 0; i < > > entries.getLength(); i++) { > > photos.add(new Photo > > (entries.item(i))); > > } > > callback.callback(photos); > > } > > }); > > } catch (RequestException e) { > > System.out.println(e); > > } > > } --~--~---------~--~----~------------~-------~--~----~ 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-toolkit@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 -~----------~----~----~----~------~----~------~--~---