Re: Intercept response from remote services

2012-10-17 Thread Jens
Something like this does not exists as far as I know. You can create a static factory method like "Services.newXyzService()", do a global text search for GWT.create(.class) and replace it with the corresponding factory method. After a global "organize imports" done by your IDE everything should

Re: Intercept response from remote services

2012-10-17 Thread jdevelop
This mean I need to take service after it's created with GWT.create(..), however this will require me to perform this step on every service creation. That's not what I am looking for. I hope there may be some sort of global request builder registered or some sort of a hook? On Wednesday, Octobe

Re: Intercept response from remote services

2012-10-16 Thread Jens
You can cast your GWT-RPC service interface into ServiceDefTarget and set a custom RpcRequestBuilder. Your custom RpcRequestBuilder should overwrite doSetCallback() and wrap the provided RequestCallback with a custom one. In RequestCallback.onResponseReceived() you have access to HTTP headers.

Intercept response from remote services

2012-10-16 Thread jdevelop
Hello! Is there any simple way to intercept response from all registered remote services on client side? I need to check if certain HTTP headers contain pre-defined values, and if not - then send events/ redirect to another page. I don't want to throw exceptions on server-side and handle them in