Results 1 to 2 of 2

Thread: [LoginInterceptor] How to send response ?

  1. #1
    Join Date
    Apr 2008
    Posts
    8

    Default [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.

  2. #2

    Default

    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.
    Tareq Abedrabbo

    My Twitter
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •