1 22 package org.jboss.test.webservice.header; 23 24 import org.jboss.logging.Logger; 25 import org.jboss.util.id.UID; 26 27 import java.rmi.RemoteException ; 28 29 33 public class ExplicitHeaderEndpointImpl implements ExplicitHeaderEndpoint 34 { 35 private final Logger log = Logger.getLogger(ExplicitHeaderEndpointImpl.class); 37 38 public boolean doStuff(String parameter, SessionHeaderHolder headerHolder) throws RemoteException 39 { 40 if (parameter == null) 41 throw new IllegalArgumentException ("Null parameter"); 42 43 if (headerHolder == null) 44 throw new IllegalArgumentException ("Null headerHolder parameter"); 45 46 if (headerHolder.value == null) 47 throw new IllegalArgumentException ("Null headerHolder.value parameter"); 48 49 SessionHeader header = headerHolder.value; 50 String username = header.getUsername(); 51 String sessionID = header.getSessionID(); 52 53 log.info("username: " + username); 54 log.info("sessionID: " + sessionID); 55 56 if (sessionID == null) 57 header.setSessionID(UID.asString()); 58 59 return true; 60 } 61 } 62 | Popular Tags |