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(org.apache.ws.commons.soap.SOAPEnvelope env, boolean disableDoom)
          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 org.apache.ws.commons.soap.SOAPEnvelope getSOAPEnvelopeFromDOOMDocument(Document doc, boolean disableDoom)
           
static Element toDOM(org.apache.ws.commons.om.OMElement element)
          Converts a given OMElement to a DOM Element.
static org.apache.ws.commons.om.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(org.apache.ws.commons.soap.SOAPEnvelope env,
                                                   boolean disableDoom)
                                            throws org.apache.ws.security.WSSecurityException
Creates a DOM Document using the SOAP Envelope.

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

getSOAPEnvelopeFromDOOMDocument

public static org.apache.ws.commons.soap.SOAPEnvelope getSOAPEnvelopeFromDOOMDocument(Document doc,
                                                                                      boolean disableDoom)

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 org.apache.ws.commons.om.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(org.apache.ws.commons.om.OMElement element)
                     throws Exception
Converts a given OMElement to a DOM Element.

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