1 package org.codehaus.xfire.transport.http; 2 3 import javax.xml.stream.XMLStreamReader; 4 import org.codehaus.xfire.MessageContext; 5 import org.codehaus.xfire.fault.XFireFault; 6 import org.codehaus.xfire.handler.EchoHandler; 7 8 /*** 9 * Stuffs something in the session. 10 * 11 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> 12 */ 13 public class MockSessionHandler 14 extends EchoHandler 15 { 16 public static boolean inSession = false; 17 18 public void invoke( MessageContext context, XMLStreamReader reader ) 19 throws XFireFault 20 { 21 super.invoke( context, reader ); 22 23 System.out.println("putting in session"); 24 context.getSession().put("key", "hello world"); 25 26 if ( context.getSession().get("key").equals("hello world") ) 27 inSession = true; 28 } 29 30 }