I am new in GWT 2.0 and JSON. I need to get some values using JSON.
so I downloaded "json" sample from code.google.com. When I run the
project Its working fine. but when I change the url, I am getting
error below.

"com.google.gwt.http.client.RequestPermissionException: The URL
http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=potato&results=2&output=json
is invalid or violates the same-origin security restriction"


Its working when code like below,
private static final String DEFAULT_SEARCH_URL =
GWT.getModuleBaseURL()
      + "search-results.js";

private final RequestBuilder requestBuilder = new RequestBuilder(
                  RequestBuilder.GET, DEFAULT_SEARCH_URL);

And this is what I did;
private final RequestBuilder requestBuilder = new RequestBuilder(
                  
RequestBuilder."http://api.search.yahoo.com/ImageSearchService/V1/
imageSearch?appid=YahooDemo&query=potato&results=2&output=json");

-- 
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