I created a RPC service which created a SportsLeagueAndroidRequest in the appengine shared folder. When I am running to try my project it shows an error
[ERROR] [sportsleagueandroid] – Deferred binding result type ‘edu.columbia.sportsleagueandroid.shared.SportsLeagueAndroidRequest’ should not be abstract
SportsLeagueAndroidRequest is an interface generated automatically when you create a RPC service!!
How can I remove this error?
final EventBus eventBus = new SimpleEventBus();
final MyRequestFactory requestFactory = GWT.create(SportsLeagueAndroidRequest.class);
requestFactory.initialize(eventBus);
sendMessageButton.addClickHandler(new ClickHandler()
{
public void onClick(ClickEvent event)
{
//String recipient = recipientArea.getValue();
//String receivers[] = recipient.split(",");
String message = messageArea.getValue();
// setStatus("Connecting...", false);
sendMessageButton.setEnabled(false);
sendNewTaskToServer(message);
}
private void sendNewTaskToServer(String message) {
SportsLeagueAndroidRequest request = requestFactory.sportsLeagueAndroidRequest();
StadiumProxy task = request.create(StadiumProxy.class);
You are invoking
GWT.createon aRequestContext. It needs to be invoked on aRequestFactoryas explained here.You need to create an interface that extends
RequestFactoryas in the example I linked to. If you look in yoursendNewTaskToServermethod, you are actually callingsportsLeagueAndroidRequest()fromSportsLeagueAndroidRequest. See? You should be callingsportsLeagueAndroidRequest()from yourRequestFactoryinterface that you previously created withGWT.create.The RequestFactory lifecycle looks something like this:
RequestFactoryusingGWT.create(MyRequestFactory.class)RequestContextusingmyRequestFactory.myRequestContext()myRequestContext().myDomainMethod().fire()