Apr 20th, 2008, 10:48 AM
[LoginInterceptor] How to send response ?
How to send back response to the client in an EndpointInterceptor without processing the endpoint ?
Ex for a LoginInterceptor :
request -> interceptor#login() -> "login failed" -> send response
The handleRequest method return boolean. After a login failed should I return fasle, throw Exception ?
Thansk for any help.
Apr 20th, 2008, 06:23 PM
That depends on what you want to do. Returning false in the EndpointInterceptor.handleRequest method discontinues the invocation of any further interceptor in the invocation chain (and the endpoint) and triggers the response handling phase.
A more natural way would be to throw an exception in your interceptor and to define an EndpointExceptionResolver in your application context that maps your exception to a SOAP fault (provided you're using SOAP of course).
Check out the several implementations provided by Spring-WS. You can even implement your own if none suits your needs.