Hi,
Could anyone please tell a rookie if there is any server side code
absolutely necessary in order to fetch data from a remote host? Later on I
will want to add authentication...
I have set up a working testGwtRestlet-2-0 example and added following lines
to onModuleLoad:
ClientResource r = new
ClientResource("http://www.remotedomein.com/RESTfulTest/resources/customers/pkey/2176172632");
r.setOnReceived(new Uniform() {
public void handle(Request request, Response response) {
System.out.println("request.getResourceRef(): " +
request.getResourceRef());
System.out.println("response.getStatus(): " +
response.getStatus());
}
});
r.get();
as a debug message a get:
request.getResourceRef():
http://www.remotedomein.com/RESTfulTest/resources/customers/pkey/2176172632
response.getStatus(): Internal Connector Error (1002) -
(NS_ERROR_NOT_AVAILABLE): Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]
QueryInterface: function QueryInterface() {
[native code]
}
result: 2147746065
filename: http://127.0.0.1:8888
lineNumber: 36
columnNumber: 0
inner: null
data: null
initialize: function initialize() {
[native code]
}
Thank you for your help.
mm
--
View this message in context:
http://n2.nabble.com/Minimum-GWT-code-for-ClientResource-from-a-different-host-tp4618429p4618429.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2450988