Hi,
I'm trying to implement my gwt application with rpc service
I wrote a simple java application for testing, it does simple String
message passing from server to client
But it doesn't work and return with
'com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException'
error.
I have no idea how to fix it...please HELP an with big THANKS!!
----------------------
HelloWorld.java
----------------------
public class HelloWorld implements EntryPoint {
private String strMsg = "";
public void onModuleLoad() {
final HelloServiceAsync helloService = (HelloServiceAsync)
GWT.create(HelloService.class);
ServiceDefTarget target = (ServiceDefTarget) helloService;
String moduleRelativeURL = GWT.getModuleBaseURL() + "hello";
target.setServiceEntryPoint(moduleRelativeURL);
final AsyncCallback<String> callback = new
AsyncCallback<String>()
{
public void onSuccess(String result) {
String temp = result;
strMsg = temp;
}
public void onFailure(Throwable caught) {
strMsg = "error happened...";
}
};
helloService.getMessage(callback);
(other gui codes here)....
}
}
------------------------
HelloService.java
------------------------
public interface HelloService extends RemoteService {
public String getMessage();
}
---------------------------------
HelloServiceAsync.java
---------------------------------
public interface HelloServiceAsync {
public void getMessage(AsyncCallback<String> callback);
}
------------------------------
HelloServiceImpl.java
------------------------------
public class HelloServiceImpl extends RemoteServiceServlet implements
HelloService {
public String getMessage() {
String temp = "I am server";
return temp;
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---