Package org.apache.axis2.saaj.util
Class SAAJUtil
- java.lang.Object
-
- org.apache.axis2.saaj.util.SAAJUtil
-
public class SAAJUtil extends Object
Utility class for the Axis2-WSS4J Module
-
-
Constructor Summary
Constructors Constructor Description SAAJUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
compareContentTypes(String contentType1, String contentType2)
static MimeHeaders
copyMimeHeaders(MimeHeaders headers)
Create a copy of an existingMimeHeaders
object.static Document
getDocumentFromSOAPEnvelope(SOAPEnvelope env)
Create a DOM Document using the org.apache.axiom.soap.SOAPEnvelopestatic SOAPEnvelope
getSOAPEnvelopeFromDOOMDocument(Document doc)
static String
normalizeContentType(String contentType)
Normalize a content type specification.static Element
toDOM(OMElement element)
Convert a given OMElement to a DOM Elementstatic Element
toDOOMSOAPEnvelope(SOAPEnvelope env)
Create a DOM Document using the org.apache.axiom.soap.SOAPEnvelopestatic SOAPEnvelope
toOMSOAPEnvelope(SOAPMessage message)
Convert a SAAJ message to an Axiom SOAP envelope object and process xop:Include elements.static SOAPEnvelope
toOMSOAPEnvelope(Element elem)
-
-
-
Method Detail
-
getDocumentFromSOAPEnvelope
public static Document getDocumentFromSOAPEnvelope(SOAPEnvelope env)
Create a DOM Document using the org.apache.axiom.soap.SOAPEnvelope- Parameters:
env
- An org.apache.axiom.soap.SOAPEnvelope instance- Returns:
- the DOM Document of the given SOAP Envelope
-
toDOOMSOAPEnvelope
public static Element toDOOMSOAPEnvelope(SOAPEnvelope env)
Create a DOM Document using the org.apache.axiom.soap.SOAPEnvelope- Parameters:
env
- An org.apache.axiom.soap.SOAPEnvelope instance- Returns:
- the org.apache.axis2.soap.impl.dom.SOAPEnvelopeImpl of the given SOAP Envelope
-
getSOAPEnvelopeFromDOOMDocument
public static SOAPEnvelope getSOAPEnvelopeFromDOOMDocument(Document doc)
-
toOMSOAPEnvelope
public static SOAPEnvelope toOMSOAPEnvelope(Element elem)
-
toOMSOAPEnvelope
public static SOAPEnvelope toOMSOAPEnvelope(SOAPMessage message) throws SOAPException
Convert a SAAJ message to an Axiom SOAP envelope object and process xop:Include elements.- Parameters:
message
- the SAAJ message- Returns:
- the OM SOAP envelope
- Throws:
SOAPException
-
toDOM
public static Element toDOM(OMElement element) throws Exception
Convert a given OMElement to a DOM Element- Parameters:
element
-- Returns:
- DOM Element
- Throws:
Exception
-
copyMimeHeaders
public static MimeHeaders copyMimeHeaders(MimeHeaders headers)
Create a copy of an existingMimeHeaders
object.- Parameters:
headers
- the object to copy- Returns:
- a copy of the
MimeHeaders
object
-
normalizeContentType
public static String normalizeContentType(String contentType)
Normalize a content type specification. This removes all parameters from the content type and converts it to lower case.- Parameters:
contentType
- the content type to normalize- Returns:
- the normalized content type
-
-