I haven an application with 2 GWT-modules (.gwt.xml). I want to share between them one RPC service. But modules have different names, so first module calls RPC service from
FIRSTModuleName/relativepath (and it works)
but second module try to call it from
SECONDModuleName/relativepath (it doesn’t work, because path is incorrect).
You can either map your
RemoteserviceServletto both URLs (by far the simplest solution), or you can change your client-side code to make both modules call the same URL.For the latter, don’t use
@RemoteServiceRelativePathbut instead cast your service async toServiceDefTargetand callsetServiceEntryPointwith the URL you want to use (@RemoteServiceRelativePathis only a shortcut to havesetServiceEntryPointcalled automatically withGWT.getModuleBaseURL() + relativePath).I believe you could also use a
../-style URL in your@RemoteServiceRelativePath.