Class AxiomUtils
java.lang.Object
org.springframework.ws.soap.axiom.support.AxiomUtils
Collection of generic utility methods to work with Axiom. Includes conversion from
OMNamespaces to QNames.- Since:
- 1.0.0
- See Also:
-
OMNamespaceQName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidremoveContents(org.apache.axiom.om.OMContainer container) Removes the contents (i.e.static DocumenttoDocument(org.apache.axiom.soap.SOAPEnvelope envelope) Converts a given AXIOMSOAPEnvelopeto aDocument.static org.apache.axiom.soap.SOAPEnvelopetoEnvelope(Document document) Converts a givenDocumentto an AXIOMSOAPEnvelope.static StringtoLanguage(Locale locale) Converts the given locale to axml:langstring, as used in Axiom Faults.static LocaleConverts the given locale to axml:langstring, as used in Axiom Faults.static org.apache.axiom.om.OMNamespacetoNamespace(QName qName, org.apache.axiom.om.OMElement resolveElement) Converts ajavax.xml.namespace.QNameto 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.QNameto aorg.apache.axiom.om.OMNamespace. AOMElementis used to resolve the namespace, or to declare a new one.- Parameters:
qName- theQNameto convertresolveElement- the element used to resolve the Q- Returns:
- the converted SAAJ Name
- Throws:
org.apache.axiom.om.OMException- if conversion is unsuccessfulIllegalArgumentException- ifqNameis not fully qualified
-
toLanguage
Converts the given locale to axml:langstring, as used in Axiom Faults.- Parameters:
locale- the locale- Returns:
- the language string
-
toLocale
Converts the given locale to axml:langstring, 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 AXIOMSOAPEnvelopeto aDocument.- Parameters:
envelope- the SOAP envelope to be converted- Returns:
- the converted document
- Throws:
IllegalArgumentException- in case of errors
-
toEnvelope
Converts a givenDocumentto an AXIOMSOAPEnvelope.- Parameters:
document- the document to be converted- Returns:
- the converted envelope
- Throws:
IllegalArgumentException- in case of errors
-