Class Axis2Util

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

public class Axis2Util extends Object
Utility class for the Axis2-WSS4J Module
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Document
    getDocumentFromSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env, boolean useDoom)
    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.axiom.soap.SOAPEnvelope
    Builds a SOAPEnvelope from DOM Document.
    static boolean
     
    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 Details

    • Axis2Util

      public Axis2Util()
  • Method Details

    • isUseDOOM

      public static boolean isUseDOOM()
    • useDOOM

      public static void useDOOM(boolean isDOOMRequired)
    • getDocumentFromSOAPEnvelope

      public static Document getDocumentFromSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env, boolean useDoom) throws org.apache.wss4j.common.ext.WSSecurityException
      Creates a DOM Document using the SOAP Envelope.
      Parameters:
      env - An org.apache.axiom.soap.SOAPEnvelope instance
      useDoom - boolean to enable the feature
      Returns:
      Document Returns the DOM Document of the given SOAP Envelope.
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException - If an error occurred getting the Document
    • getSOAPEnvelopeFromDOMDocument

      public static org.apache.axiom.soap.SOAPEnvelope getSOAPEnvelopeFromDOMDocument(Document doc, boolean useDoom) throws org.apache.wss4j.common.ext.WSSecurityException
      Builds a SOAPEnvelope from DOM Document.
      Parameters:
      doc - - The dom document that contains a SOAP message
      useDoom - boolean to enable the feature
      Returns:
      SOAPEnvelope SOAPEnvelope from DOM Document
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException - If an error occurred getting the SOAPEnvelope
    • 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.
    • 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 - OMFactory Object
      element - OMElement element
      Returns:
      OMElement The OMElement to return