org.apache.ws.util
Class SaajUtils

java.lang.Object
  extended byorg.apache.ws.util.SaajUtils

public abstract class SaajUtils
extends java.lang.Object

LOG-DONE

Author:
Ian P. Springer (Hewlett-Packard Company)

Field Summary
static org.apache.ws.util.i18n.Messages MSG
          DOCUMENT_ME
 
Constructor Summary
SaajUtils()
           
 
Method Summary
static javax.xml.soap.DetailEntry addDetailEntry(javax.xml.soap.Detail detail, org.w3c.dom.Element domElem)
          Adds a DOM Element as an entry to a SAAJ Detail.
static void addTextNode(javax.xml.soap.SOAPElement soapElem, java.lang.String value)
          DOCUMENT_ME
static javax.xml.soap.Text createTextNode(java.lang.String value)
          DOCUMENT_ME
static java.util.List getChildNodes(javax.xml.soap.SOAPElement soapElem)
          Given a SOAPElement, returns a list containing the children of that element.
static javax.xml.namespace.QName getQualifiedName(javax.xml.soap.SOAPElement elem)
          DOCUMENT_ME
static java.lang.String getValue(javax.xml.soap.Node soapNode)
          Returns the value of the specified SAAJ text node.
static boolean isSOAPElement(javax.xml.soap.Node soap_node)
          Returns true if the specified SAAJ node is an element, or false otherwise.
static boolean isText(javax.xml.soap.Node soap_node)
          Returns true if the specified SAAJ node is text, or false otherwise.
static javax.xml.soap.SOAPElement toSOAPElement(org.w3c.dom.Element elem)
          Converts a DOM Element to a SAAJ SOAPElement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG

public static final org.apache.ws.util.i18n.Messages MSG
DOCUMENT_ME

Constructor Detail

SaajUtils

public SaajUtils()
Method Detail

getChildNodes

public static java.util.List getChildNodes(javax.xml.soap.SOAPElement soapElem)
Given a SOAPElement, returns a list containing the children of that element. If at least one of the children is a SOAPElement, any Text nodes are excluded from the list. This is because it is assumed that if the specified element has mixed content, it is only because of insignificant whitespace text nodes.

Parameters:
soapElem - a SAAJ SOAPElement
Returns:
a list containing the children of the specified SOAPElement

getQualifiedName

public static javax.xml.namespace.QName getQualifiedName(javax.xml.soap.SOAPElement elem)
DOCUMENT_ME

Parameters:
elem - DOCUMENT_ME
Returns:
DOCUMENT_ME

isSOAPElement

public static boolean isSOAPElement(javax.xml.soap.Node soap_node)
Returns true if the specified SAAJ node is an element, or false otherwise.

Parameters:
soap_node - a SAAJ node
Returns:
true if the specified SAAJ node is an element, or false otherwise

isText

public static boolean isText(javax.xml.soap.Node soap_node)
Returns true if the specified SAAJ node is text, or false otherwise.

Parameters:
soap_node - a SAAJ node
Returns:
true if the specified SAAJ node is text, or false otherwise

getValue

public static java.lang.String getValue(javax.xml.soap.Node soapNode)
                                 throws javax.xml.soap.SOAPException
Returns the value of the specified SAAJ text node.

Parameters:
soapNode - a SAAJ text node
Returns:
the value of the specified SAAJ text node
Throws:
javax.xml.soap.SOAPException

addDetailEntry

public static javax.xml.soap.DetailEntry addDetailEntry(javax.xml.soap.Detail detail,
                                                        org.w3c.dom.Element domElem)
                                                 throws javax.xml.soap.SOAPException
Adds a DOM Element as an entry to a SAAJ Detail.

Parameters:
detail - a SAAJ detail
domElem - a DOM element to be added as an entry in the specified detail
Returns:
a SAAJ detail entry
Throws:
javax.xml.soap.SOAPException

addTextNode

public static void addTextNode(javax.xml.soap.SOAPElement soapElem,
                               java.lang.String value)
                        throws javax.xml.soap.SOAPException
DOCUMENT_ME

Parameters:
soapElem - DOCUMENT_ME
value - DOCUMENT_ME
Throws:
javax.xml.soap.SOAPException - DOCUMENT_ME

createTextNode

public static javax.xml.soap.Text createTextNode(java.lang.String value)
                                          throws javax.xml.soap.SOAPException
DOCUMENT_ME

Parameters:
value - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
javax.xml.soap.SOAPException - DOCUMENT_ME

toSOAPElement

public static javax.xml.soap.SOAPElement toSOAPElement(org.w3c.dom.Element elem)
                                                throws javax.xml.soap.SOAPException
Converts a DOM Element to a SAAJ SOAPElement.

Parameters:
elem - a DOM Element
Returns:
a SOAPElement
Throws:
javax.xml.soap.SOAPException


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.