JsonpRequestBuilder Timeout - GWT 2.0

496 views
Skip to first unread message

Márcio Menezes

unread,
Jun 30, 2010, 10:11:27 AM6/30/10
to google-we...@googlegroups.com
Hello!
I'm trying to retrieve Json using JsonpRequestBuilder.
When I use some external url, like this one http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json, everything works fine.
But, when I try to fetch json from some server inside my network, I get timeout error (Timeout while calling http://192.168.2.12/gwt.js).

When I check the request on firebug, I can see that the response came back and its body is exactly what I was suppose to receive. Somehow, it is not being handled by the callback function.

If I try the same URL through browser, it works fine.

Does anyone know what it can be?

Marcio

Thomas Broyer

unread,
Jun 30, 2010, 7:10:18 PM6/30/10
to Google Web Toolkit

On 30 juin, 16:11, Márcio Menezes <marcio....@gmail.com> wrote:
> Hello!
> I'm trying to retrieve Json using JsonpRequestBuilder.
> When I use some external url, like this onehttp://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=Y...,
> everything works fine.
> But, when I try to fetch json from some server inside my network, I get
> timeout error (Timeout while callinghttp://192.168.2.12/gwt.js).
>
> When I check the request on firebug, I can see that the response came back
> and its body is exactly what I was suppose to receive. Somehow, it is not
> being handled by the callback function.
>
> If I try the same URL through browser, it works fine.
>
> Does anyone know what it can be?

Are you returning JSON-*P* (i.e. a JavaScript file containing a single
function call with an object or array literal as sole argument)?
Is the function call using the function name given in the URL (in the
query-string, name of the parameter configurable in your
JsonpRequestBuilder)?

eggsy84

unread,
Jul 1, 2010, 4:17:26 AM7/1/10
to Google Web Toolkit
Yeah you need to make sure you wrap your response with the callback
parameter that the JsonpRequestBuilder makes use of.

If you look at the response you receive from the Yahoo! Web service
you see that it is wrapped in a callback parameter you need to make
sure you code does that as well.

Eggsy
Reply all
Reply to author
Forward
0 new messages