Spring Web Services Framework

org.springframework.ws.soap.axiom.support
Class AxiomUtils

java.lang.Object
  extended by org.springframework.ws.soap.axiom.support.AxiomUtils

public abstract class AxiomUtils
extends Object

Collection of generic utility methods to work with Axiom. Includes conversion from OMNamespaces to QNames.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
OMNamespace, QName

Constructor Summary
AxiomUtils()
           
 
Method Summary
static void removeContents(OMContainer container)
          Removes the contents (i.e. children) of the container.
static String toLanguage(Locale locale)
          Converts the given locale to a xml:lang string, as used in Axiom Faults.
static Locale toLocale(String language)
          Converts the given locale to a xml:lang string, as used in Axiom Faults.
static OMNamespace toNamespace(QName qName, OMElement resolveElement)
          Converts a javax.xml.namespace.QName to a org.apache.axiom.om.OMNamespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxiomUtils

public AxiomUtils()
Method Detail

toNamespace

public static OMNamespace toNamespace(QName qName,
                                      OMElement resolveElement)
                               throws OMException
Converts a javax.xml.namespace.QName to a org.apache.axiom.om.OMNamespace. A OMElement is used to resolve the namespace, or to declare a new one.

Parameters:
qName - the QName to convert
resolveElement - the element used to resolve the Q
Returns:
the converted SAAJ Name
Throws:
OMException - if conversion is unsuccessful
IllegalArgumentException - if qName is not fully qualified

toLanguage

public static String toLanguage(Locale locale)
Converts the given locale to a xml:lang string, as used in Axiom Faults.

Parameters:
locale - the locale
Returns:
the language string

toLocale

public static Locale toLocale(String language)
Converts the given locale to a xml:lang string, as used in Axiom Faults.

Parameters:
language - the language string
Returns:
the locale

removeContents

public static void removeContents(OMContainer container)
Removes the contents (i.e. children) of the container.


Spring Web Services Framework

Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.