I need some help getting a simple JSONP example to work. I just want to call a URL and parse the map that is returned. Need to (1) figure out why my code below doesn't work and (2) how to parse the map
e.g. I have a server (192.168.1.99) that has a script: http://192.168.1.99/some_path/some_script.php?url=some_argument&jsoncallback=whatever returns: whatever({enabled:false,value:"/some_argument"}); I need to call the script using GWT 2.0.2 so I tried this: private void callJSONP() { Log.debug("callJSONP()"); String url = "http://192.168.1.99/some_path/some_script.php? url=some_argument&jsoncallback=whatever"; JsonpRequestBuilder jsonp = new JsonpRequestBuilder(); jsonp.setTimeout(20000); jsonp.requestString(url, new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { Log.debug("***** JSONP Error: " + caught); } @Override public void onSuccess(String result) { Log.debug("***** JSONP success obj = " + result); } }); } BUT I am getting a timeout exception! If I type the URL in my broswer, it comes back right away so I think I am setting up the request incorrectly. This is what I see in the Firebug console: [DEBUG] ***** JSONP Error: com.google.gwt.jsonp.client.TimeoutException: Timeout while calling http://192.168.1.99/some_path/some_script.php?url=some_argument&jsoncallback=whatever -- 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.