org.sape.smfw.soapengine
Class HeaderAuthenticationHandler

java.lang.Object
  extended byorg.apache.axis.handlers.BasicHandler
      extended byorg.sape.smfw.soapengine.HeaderAuthenticationHandler
All Implemented Interfaces:
org.apache.axis.Handler, Serializable

public class HeaderAuthenticationHandler
extends org.apache.axis.handlers.BasicHandler

Extracts a User object from the "user" header and stores it in the SOAP MessageContext. The format of the user header is shown below. Make this handler part of the request chain to extract the user header.

   <soapenv:Header>
     <ns1:user xmlns:ns1="http://www.sape.org/smfw/user">
       <principal>nbhatia</principal>
       <credentials>nbhatia</credentials>
     </ns1:user>
   </soapenv:Header>
 

See Also:
Serialized Form

Field Summary
private static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
 
Constructor Summary
HeaderAuthenticationHandler()
           
 
Method Summary
private  String getChildElementValue(org.apache.axis.message.MessageElement parent, String childName)
          Returns the value of the child element with the specified QName.
 void invoke(org.apache.axis.MessageContext messageContext)
           
 
Methods inherited from class org.apache.axis.handlers.BasicHandler
canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
Constructor Detail

HeaderAuthenticationHandler

public HeaderAuthenticationHandler()
Method Detail

invoke

public void invoke(org.apache.axis.MessageContext messageContext)
            throws org.apache.axis.AxisFault
Throws:
org.apache.axis.AxisFault
See Also:
Handler.invoke(MessageContext)

getChildElementValue

private String getChildElementValue(org.apache.axis.message.MessageElement parent,
                                    String childName)
Returns the value of the child element with the specified QName.

Parameters:
parent - the parent message element
childName - name of the child element whose value is needed
Returns:
String value of the child element or null if child not found


Copyright 2003 Sapient Corporation. All Rights Reserved.