Hi,
I have a simple callback to a remote server like this:
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
try {
builder.sendRequest(null, new RequestCallback() {
public void onError(Request request, Throwable
exception)
{ Window.alert("Failed to send the request: " +
exception.getMessage()); }
public void onResponseReceived(Request request,
Response response)
{
if (200 == response.getStatusCode()) {
Window.alert(response.getText());
} else {
Window.alert("STATUS CODE:
"+response.getStatusCode());
}
}
});
} catch (RequestException e) { Window.alert("Failed to send the
request: " + e.getMessage()); }
}
and it returns "STATUS CODE: 0". The url is a remote public CGI (not
under my control).
I added in my gwt.xml file this:
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.google.gwt.http.HTTP"/>
<add-linker name="xs"/>
as I supposed it to be a SOP problem.
But unfortunately it doesn't work me, either using a deployed app on
tomcat or with "run as-> web application" in eclipse.
Have you any idea?
Thanks,
Julio
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.