Package org.apache.rampart.util
Class Axis2Util
java.lang.Object
org.apache.rampart.util.Axis2Util
Utility class for the Axis2-WSS4J Module
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentgetDocumentFromSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env, boolean useDoom) Creates a DOM Document using the SOAP Envelope.static StringProvides the appropriate key to pickup config params from the message context.static org.apache.axiom.soap.SOAPEnvelopegetSOAPEnvelopeFromDOMDocument(Document doc, boolean useDoom) Builds a SOAPEnvelope from DOM Document.static booleanstatic org.apache.axiom.om.OMElementtoDOOM(org.apache.axiom.om.OMFactory factory, org.apache.axiom.om.OMElement element) This will build a DOOM Element that is of the sameDocumentstatic voiduseDOOM(boolean isDOOMRequired)
-
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 instanceuseDoom- 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 messageuseDoom- 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
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 keyinHandler- Whether the handler is the inflow handler or notrepetition- 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 sameDocument- Parameters:
factory- OMFactory Objectelement- OMElement element- Returns:
- OMElement The OMElement to return
-