I'm getting a 404 error when accessing a dispatch service. It's my first time using the @GenDispatch but I'm pretty sure I've done it right. I already have one working LoginActionHandler which I hand made (LoginActionHandler). Anything look weird here? (THANKS!)
[WARN] 404 - POST /dispatch/FindUsers (127.0.0.1) 1404 bytes
Request headers
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: JSESSIONID=adjt4k0qdvua; MYCOOKIE=adjt4k0qdvua
X-GWT-Permutation: HostedMode
Content-Type: text/x-gwt-rpc; charset=utf-8
Content-Length: 275
Pragma: no-cache
Cache-Control: no-cache
Response headers
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1404
I've defined my action / response using the gen tool...
@GenDispatch
public class FindUsers {
@Out(1) List<User> users;
}
I have a Handler like this...
public class FindUsersActionHandler implements ActionHandler<FindUsersAction, FindUsersResult> {
@Override
public Class<FindUsersAction> getActionType() {
return FindUsersAction.class;
}
@Override
public FindUsersResult execute(FindUsersAction arg0,
ExecutionContext arg1) throws ActionException {
return new FindUsersResult(new ArrayList<User>());
}
@Override
public void undo(FindUsersAction action, FindUsersResult result,
ExecutionContext context) throws ActionException {
// Nothing to do.
}
}
Here's my DispatchServerModule...
public class DispatchServletModule extends ServletModule {
@Override
public void configureServlets() {
filter("*.jsp").through(HttpSessionSecurityCookieFilter.class);
bindConstant().annotatedWith(SecurityCookie.class).to("MYCOOKIE");
serve("/" + ActionImpl.DEFAULT_SERVICE_NAME).with(DispatchServiceImpl.class);
}
}
And my ServerModule...
public class ServerModule extends HandlerModule {
@Override
protected void configureHandlers() {
bindHandler(LoginAction.class, LoginActionHandler.class);
bindHandler(FindUsersAction.class, FindUsersActionHandler.class);
bindHandler(AddUserAction.class, AddUserActionHandler.class);
}
}
And my GuiceServletContextListener...
public class MyGuiceServletContextListener extends GuiceServletContextListener {
@Override
protected Injector getInjector() {
return Guice.createInjector(new ServerModule(), new DispatchServletModule());
}
}
I'm puzzled.
,boz