org.apache.axis2.security.util
Class Axis2Util

java.lang.Object
  extended byorg.apache.axis2.security.util.Axis2Util

public class Axis2Util
extends Object

Utility class for the Axis2-WSS4J Module


Constructor Summary
Axis2Util()
           
 
Method Summary
static Document getDocumentFromSOAPEnvelope(SOAPEnvelope env)
          Creates a DOM Document using the SOAP Envelope.
static String getKey(String originalKey, boolean inHandler, int repetition)
          Provides the appropriate key to pickup config params from the message context.
static SOAPEnvelope getSOAPEnvelopeFromDOOMDocument(DocumentImpl doc)
           
static Element toDOM(OMElement element)
          Converts a given OMElement to a DOM Element.
static OMElement toOM(Element element)
          Converts a given DOM Element to an OMElement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Axis2Util

public Axis2Util()
Method Detail

getDocumentFromSOAPEnvelope

public static Document getDocumentFromSOAPEnvelope(SOAPEnvelope env)
                                            throws org.apache.ws.security.WSSecurityException
Creates a DOM Document using the SOAP Envelope.

Parameters:
env - An org.apache.axis2.soap.SOAPEnvelope instance
Returns:
Returns the DOM Document of the given SOAP Envelope.
Throws:
Exception
org.apache.ws.security.WSSecurityException

getSOAPEnvelopeFromDOOMDocument

public static SOAPEnvelope getSOAPEnvelopeFromDOOMDocument(DocumentImpl doc)

getKey

public static String getKey(String originalKey,
                            boolean inHandler,
                            int repetition)
Provides the appropriate key to pickup config params from the message context. This is acutally used when the outflow handler (WSDoAllSender) is repeated n number of times.

Parameters:
originalKey - The default key
inHandler - Whether the handler is the inflow handler or not
repetition - The current repetition number
Returns:
Returns the key to be used internally in the security module to pick up the config params.

toOM

public static OMElement toOM(Element element)
                      throws Exception
Converts a given DOM Element to an OMElement.

Parameters:
element -
Returns:
Returns OMElement.
Throws:
Exception

toDOM

public static Element toDOM(OMElement element)
                     throws Exception
Converts a given OMElement to a DOM Element.

Parameters:
element -
Returns:
Returns Element.
Throws:
Exception