Hi All,

I've been experimenting with the <a href="http://google-web-
toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/jsonp/client/
JsonpRequestBuilder.html">JsonpRequestBuilder</a> that comes with GWT
2.0 and it works fine when I connect to the Google calendar service
shown in docs but I'm having trouble with the response timing out when
I try to connect to a service running locally in the same gwt
application. Just as an experiment I stripped down the example to the
bare minimum, removing the JavaScript overlay class and came up with
this:

String url = "http://www.google.com/calendar/feeds/developer-
calen...@google.com/public/full?alt=json-in-script";

JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
jsonp.requestObject(url, new AsyncCallback() {
   public void onFailure(Throwable throwable) {
      Window.alert("Failed! " + throwable.toString());
   }

   public void onSuccess(Object feed) {
      Window.alert("Success! " + feed);
   }
});

The above works fine but when I change to url to:

"http://localhost:8888/myapp/myapp?something";

I get the client side timeout even though the service is being
connected to is returning a result.

I should note that I'm able to contact the same service running
locally using the <a href="http://google-web-toolkit.googlecode.com/
svn/javadoc/2.0/com/google/gwt/http/client/
RequestBuilder.html">RequestBuilder</a>.

Does the JsonpRequestBuilder only work when the service is located on
a different domain?

Thank you.
-- 
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