Remember that an AIR application is a stand alone application. So the use GWT RPC inside AIR you need to do 2 things.
1) give gwt4air jar file a higher priority then GWT in your eclipse project.
gwt4air ships with a patch of the Requestbuilder class to make it work inside air.
So your application will use the Requestbuilder class from gwt4air instead of the one from GWT.
2) You nee to change the ServiceEntrypoint of your RPC-Interface. So you need to do something like (using the default rpc example that comes with gwt) :
public static void sendNameToServer(String name) {
if (Runtime.isAIR()) {
ServiceDefTarget endPoint = (ServiceDefTarget) greetingService;
String serviceEntryPoint = endPoint.getServiceEntryPoint();
endPoint.setServiceEntryPoint(serviceEntryPoint);
}
//rest code here
}
note the line in bold
for AIR i changed to serviceEntrypoint to "app:/". Because that s where the AIR application is located.
Also
http://127.0.0.1:8888/ is because the application is running locally. For a productive application you will have the production url there.
after that you can process as usual
greetingService.greetServer(name, new AsyncCallback<String>() {
public void onFailure(Throwable caught) {
}
public void onSuccess(String result) {
}
});
hope this help.