Hi,

First, the scenario: I designed two GWT modules ("modA.gwt.xml and
modB.gwt.xml"), each with its own services:

// Module A services
@RemoteServiceRelativePath("serv1")
public interface Service1OnModuleA extends RemoteService { ... }

@RemoteServiceRelativePath("serv2")
public interface Service2OnModuleA extends RemoteService { ... }


// Module B services
@RemoteServiceRelativePath("servX")
public interface ServiceXOnModuleB extends RemoteService { ... }

@RemoteServiceRelativePath("servY")
public interface ServiceYOnModuleB extends RemoteService { ... }


At the server side, service implementations were configured to serve /
modA/serv1, /modA/serv2, etc..., /modB/servX, /modB/servY.

But when trying to consume Service1OnModuleA  from module B code, the
call is directed to /modB/serv1, instead of /modA/serv1. Obviously, /
modB/serv1 produces a HTTP 404 error.

By the web, I found ServiceDefTarget can be used to configure absolute
instead of relative paths:
 * ((ServiceDefTarget) gwtService).setServiceEntryPoint("/some/
absolute/path");

What would be the best practices in these scenarios? The topics bellow
can help to summarize the question.
 * How to design and consume inter-module services?
 * What's the best way to design service URLs?
 * When to use and not to use RemoteServiceRelativePath annotation?
 * Is there some way to define absolute paths without having to hard-
code it everywhere via ServiceDefTaget casts?

Thanks,
Fábio.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to