Reputation: 563
I have 2 projects, one GWT/GAE and one GAE. Both implement the appropriate Restlet jar.
The server one return the expected JSON representation when I call it from my junit test cases (using the Java SE restlet client) or when I call it from the browser but when I call it from my GWT app it doesn't work. The call looks like this:
itemSuggestProxy.getClientResource().setReference(WebSrvcConnectionMethods.getItemSuggestionURL() + queryString.trim());
try{
itemSuggestProxy.suggestByString(new Result<Representation>(){
public void onFailure(Throwable caught) {
}
public void onSuccess(Representation rep) {
....
}
The Representation rep gets returned as null and when I debug both on the server the server method suggestByString() is never hit (it is if I use the browser)
I keep them on the same server (both on localhost [different ports thou]) shouldn't that get around the Same-Origin issue? It's driving me nuts that it's not throwing any kind of exception it's just returning null.
Upvotes: 0
Views: 270
Reputation: 7985
if you are using different ports you do have problems with the same origin policy (because same origin policy applies to the port as well as the host)
Upvotes: 1