Class AxiomUtils
java.lang.Object
org.springframework.ws.soap.axiom.support.AxiomUtils
Collection of generic utility methods to work with Axiom. Includes conversion from
OMNamespace
s to QName
s.- Since:
- 1.0.0
- See Also:
-
OMNamespace
QName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
removeContents
(org.apache.axiom.om.OMContainer container) Removes the contents (i.e.static Document
toDocument
(org.apache.axiom.soap.SOAPEnvelope envelope) Converts a given AXIOMSOAPEnvelope
to aDocument
.static org.apache.axiom.soap.SOAPEnvelope
toEnvelope
(Document document) Converts a givenDocument
to an AXIOMSOAPEnvelope
.static String
toLanguage
(Locale locale) Converts the given locale to axml:lang
string, as used in Axiom Faults.static Locale
Converts the given locale to axml:lang
string, as used in Axiom Faults.static org.apache.axiom.om.OMNamespace
toNamespace
(QName qName, org.apache.axiom.om.OMElement resolveElement) Converts ajavax.xml.namespace.QName
to aorg.apache.axiom.om.OMNamespace
.
-
Constructor Details
-
AxiomUtils
public AxiomUtils()
-
-
Method Details
-
toNamespace
public static org.apache.axiom.om.OMNamespace toNamespace(QName qName, org.apache.axiom.om.OMElement resolveElement) throws org.apache.axiom.om.OMException Converts ajavax.xml.namespace.QName
to aorg.apache.axiom.om.OMNamespace
. AOMElement
is used to resolve the namespace, or to declare a new one.- Parameters:
qName
- theQName
to convertresolveElement
- the element used to resolve the Q- Returns:
- the converted SAAJ Name
- Throws:
org.apache.axiom.om.OMException
- if conversion is unsuccessfulIllegalArgumentException
- ifqName
is not fully qualified
-
toLanguage
Converts the given locale to axml:lang
string, as used in Axiom Faults.- Parameters:
locale
- the locale- Returns:
- the language string
-
toLocale
Converts the given locale to axml:lang
string, as used in Axiom Faults.- Parameters:
language
- the language string- Returns:
- the locale
-
removeContents
public static void removeContents(org.apache.axiom.om.OMContainer container) Removes the contents (i.e. children) of the container. -
toDocument
Converts a given AXIOMSOAPEnvelope
to aDocument
.- Parameters:
envelope
- the SOAP envelope to be converted- Returns:
- the converted document
- Throws:
IllegalArgumentException
- in case of errors
-
toEnvelope
Converts a givenDocument
to an AXIOMSOAPEnvelope
.- Parameters:
document
- the document to be converted- Returns:
- the converted envelope
- Throws:
IllegalArgumentException
- in case of errors
-