You can override ProxyCreator and provide your own super class for
your RPC services (by default RPC services extends
RemoteServiceProxy).
This allows you to override doInvoke method and put additional data
into payload.

In our project (acris-security) we add session ID into the payload in
this way so you can inspire by the code:
- SessionEnabledRemoteServiceProxy - overriding doInvoke method -
http://code.google.com/p/acris/source/browse/trunk/acris-security/src/main/java/sk/seges/acris/security/client/session/SessionEnabledRemoteServiceProxy.java
- SessionProxyCreator - overriding RPC service proxy creator-
http://code.google.com/p/acris/source/browse/trunk/acris-security/src/main/java/com/google/gwt/user/rebind/rpc/SessionProxyCreator.java
- SessionRemoteServiceProxyGenerator - overrinding GWT generator -
http://code.google.com/p/acris/source/browse/trunk/acris-security/src/main/java/sk/seges/acris/security/rebind/SessionRemoteServiceProxyGenerator.java

and finally, enable generator on all RemoteService interfaces
        <generate-with
        
class="sk.seges.acris.security.rebind.SessionRemoteServiceProxyGenerator">
                <when-type-assignable
class="com.google.gwt.user.client.rpc.RemoteService" />
        </generate-with>

or you can enable this generator only for specific service interfaces.


On 25. Apr, 07:38 h., mmoossen <[email protected]> wrote:
> hi samurai!
>
> check out this 
> thread:http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> HTH
> Michael
>
> On Apr 24, 9:09 pm, keyboard_samurai <[email protected]> wrote:
>
>
>
> > Hi ,
>
> > I need to know if there is a way we can inject in a piece of code when
> > the RPC call is made to server. Basically in a typical example call
> > using RPC would have something like RemoteService.getData(String
> > param, AsyncCallback callback). Here on call to getData i would like
> > to transparently add in a piece of code which gets called whenever
> > call is being made to server via RPC. I understand the AsyncCall code
> > is being written by GWT during compile time. Is there a way we can
> > modify to get a custom code in ???
>
> > Let me Know ... Hope my problem statement was clear
>
> > Thanks !
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

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

Reply via email to