1 package com.freemindcafe.apache.cxf.jaxrs.sample9;
3 import javax.servlet.http.HttpServletRequest;
8 import org.
apache.cxf.phase.AbstractPhaseInterceptor;
23 super(Phase.PRE_PROTOCOL);
27 public void handleMessage(XMLMessage arg0)
throws Fault {
28 System.out.println(
"OutSecurityInterceptor-----------------");
30 Message inMessage = arg0.getExchange().getInMessage();
33 if(inMessage != null) {
34 HttpServletRequest req = (HttpServletRequest) inMessage.get(
"HTTP.REQUEST");
36 if(req.getSession(
false) != null) {
37 logger.debug(
"invalidating the http session");
38 req.getSession().invalidate();
40 logger.warn(
" No session found Not able to invalidate http session");
46 logger.debug(
"Exiting current user");
50 logger.warn(
"http request is null Not able to invalidate http session");