I needed a solution to intercept RPC calls to make sure the user session
hasn't expired. Here is my code:
@Override
public String processCall(String payload) throws
SerializationException {
boolean validSession =
(!getThreadLocalRequest().getSession().isNew());
In your service interface you have do declare each function throws your
custom exception otherwise you will get that error.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To view this discussion on the web visit
I am throwing IllegalArgumentException in my service interface and i still
get the 500 error.
On Tue, Jan 3, 2012 at 1:22 PM, Paul Stockley pstockl...@gmail.com wrote:
In your service interface you have do declare each function throws your
custom exception otherwise you will get that error.
return RPC.encodeResponseForFailure(null, new
IllegalArgumentException(Logged out));
service interface...
public interface GreetingService extends RemoteService {
boolean isUserLoggedIn() throws IllegalArgumentException;
}
On Tue, Jan 3, 2012 at 1:25 PM, joe kolba joekolb...@gmail.com
May also be a good idea to have all your services declare throws
SerializationException and have all your custom exceptions extend SerExc
Joe, did you fix your problem? if not, can you provide more details?
--
You received this message because you are subscribed to the Google Groups
Google
I solved it by creating a custom exception that extended
IncompatibleRemoveService exception... it seems that is the only exception
that RPC can serialize for failure.
On Tue, Jan 3, 2012 at 1:39 PM, Ashton Thomas ash...@acrinta.com wrote:
May also be a good idea to have all your services
im sorry i meant i extended RuntimeException not IncompatibleRemoteService
On Tue, Jan 3, 2012 at 1:41 PM, joe kolba joekolb...@gmail.com wrote:
I solved it by creating a custom exception that extended
IncompatibleRemoveService exception... it seems that is the only exception
that RPC can
Instead of this I would just extend RemoteServiceServlet and add a public
static method that makes the session available to everyone (just like
RequestFactoryServlet does), e.g.
public static HttpSession getThreadLocalSession() {
return getThreadLocalRequest().getSession();
}
Then in your
yeah i was thinking about doing that but im going to have to call that
static method for every rpc method, which I have around 15. Thanks I will
consider changing it to this.
On Tue, Jan 3, 2012 at 2:00 PM, Jens jens.nehlme...@gmail.com wrote:
Instead of this I would just extend
You could also implement it using a ServletFilter. Take a look at the
mobile web app example from GWT which uses a ServletFilter to authenticate
users against Google App Engine:
10 matches
Mail list logo