tags:

views:

35

answers:

0

The following works when it's in the EntryPoint class of my application, but not when it's moved somewhere else.

public MyServiceAsync service = GWT.create(MyService.class);

service.someFunction(callback);

It doesn't seem to throw an exception itself, but the application crashes on a NullPointerException when it looks for objects that were supposed to be instantiated with data from the service call. I've tried to follow it through the debugger, but it never even makes it to the server-side code or the callback.

Am I missing something? I'd prefer that all my service calls not need to be dispatched from the EntryPoint class.