org.apache.rampart.util
Class Axis2Util

java.lang.Object
  extended by org.apache.rampart.util.Axis2Util

public class Axis2Util
extends java.lang.Object

Utility class for the Axis2-WSS4J Module


Constructor Summary
Axis2Util()
           
 
Method Summary
static org.w3c.dom.Document getDocumentFromSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env, boolean useDoom)
          Creates a DOM Document using the SOAP Envelope.
static java.lang.String getKey(java.lang.String originalKey, boolean inHandler, int repetition)
          Provides the appropriate key to pickup config params from the message context.
static org.apache.axiom.soap.SOAPEnvelope getSOAPEnvelopeFromDOMDocument(org.w3c.dom.Document doc, boolean useDoom)
           
static boolean isUseDOOM()
           
static org.apache.axiom.om.OMElement toDOOM(org.apache.axiom.om.OMFactory factory, org.apache.axiom.om.OMElement element)
          This will build a DOOM Element that is of the same Document
static void useDOOM(boolean isDOOMRequired)
           
 
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

isUseDOOM

public static boolean isUseDOOM()

useDOOM

public static void useDOOM(boolean isDOOMRequired)

getDocumentFromSOAPEnvelope

public static org.w3c.dom.Document getDocumentFromSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env,
                                                               boolean useDoom)
                                                        throws org.apache.ws.security.WSSecurityException
Creates a DOM Document using the SOAP Envelope.

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

getSOAPEnvelopeFromDOMDocument

public static org.apache.axiom.soap.SOAPEnvelope getSOAPEnvelopeFromDOMDocument(org.w3c.dom.Document doc,
                                                                                boolean useDoom)
                                                                         throws org.apache.ws.security.WSSecurityException
Throws:
org.apache.ws.security.WSSecurityException

getKey

public static java.lang.String getKey(java.lang.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.

toDOOM

public static org.apache.axiom.om.OMElement toDOOM(org.apache.axiom.om.OMFactory factory,
                                                   org.apache.axiom.om.OMElement element)
This will build a DOOM Element that is of the same Document

Parameters:
factory -
element -
Returns: