Saturday, May 15, 2010

Inherit service interface from server side

Hello

In traditional JEE development you usually declare your service
interface and related implementation on the server side and expose it
to the client.

With GWT it seems from the documentation and samples that the server
side interface you want to call from the client side MUST be declared
on the client side and extends
com.google.gwt.user.client.rpc.RemoteService in order to be callable
thru RPC.

It's in fact doable as stated in this fixed issue:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1521

All you have to do is declare your service interface in a subfolder of
your "server" package", say "server.interfaces", then have a client
side interface extends this interface as well as RemoteService, then
add <source path='server/interfaces' /> to your module and you're
done

Fred

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate