Package org.apache.axis2.saaj
Class SOAPHeaderImpl
- java.lang.Object
-
- org.apache.axis2.saaj.ProxyNode<T,S>
-
- org.apache.axis2.saaj.NodeImpl<Element,T>
-
- org.apache.axis2.saaj.SOAPElementImpl<SOAPHeader>
-
- org.apache.axis2.saaj.SOAPHeaderImpl
-
- All Implemented Interfaces:
Node
,SOAPElement
,SOAPHeader
,Element
,Node
public class SOAPHeaderImpl extends SOAPElementImpl<SOAPHeader> implements SOAPHeader
-
-
Field Summary
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Constructor Description SOAPHeaderImpl(SOAPHeader header)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SOAPElement
addChildElement(String localName)
SOAPElement
addChildElement(String localName, String prefix)
SOAPElement
addChildElement(String localName, String prefix, String uri)
SOAPElement
addChildElement(Name name)
SOAPElement
addChildElement(SOAPElement soapElement)
SOAPHeaderElement
addHeaderElement(QName qname)
SOAPHeaderElement
addHeaderElement(Name name)
Creates a newSOAPHeaderElement
object initialized with the specified name and adds it to thisSOAPHeader
object.SOAPHeaderElement
addNotUnderstoodHeaderElement(QName qname)
Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.SOAPElement
addTextNode(String text)
Creates a newText
object initialized with the givenString
and adds it to thisSOAPElement
object.SOAPHeaderElement
addUpgradeHeaderElement(String s)
SOAPHeaderElement
addUpgradeHeaderElement(String[] as)
SOAPHeaderElement
addUpgradeHeaderElement(Iterator iterator)
Creates a new Upgrade SOAPHeaderElement object initialized with the specified List of supported SOAP URIs and adds it to this SOAPHeader object.protected Element
appendElement(Element child)
Iterator
examineAllHeaderElements()
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object.Iterator
examineHeaderElements(String actor)
Returns a list of all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the the specified actor.Iterator
examineMustUnderstandHeaderElements(String actor)
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent totrue
.Iterator
extractAllHeaderElements()
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object and detaches them from thisSOAPHeader
object.Iterator
extractHeaderElements(String actor)
Returns a list of all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the the specified actor and detaches them from thisSOAPHeader
object.Iterator
getChildElements()
Returns an iterator over all the immediate content of this element.Iterator
getChildElements(Name name)
-
Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addAttribute, addChildElement, addNamespaceDeclaration, clone, copyContents, createQName, getAllAttributes, getAllAttributesAsQNames, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributeValue, getAttributeValue, getChildElements, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getTagName, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setElementQName, setEncodingStyle, setValue, toString
-
Methods inherited from class org.apache.axis2.saaj.NodeImpl
detachNode, getParentElement, setParentElement
-
Methods inherited from class org.apache.axis2.saaj.ProxyNode
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOMTarget, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getTarget, getTextContent, getType, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeChild, replaceChild, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setType, setUserData, toSAAJNodeList
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
-
Methods inherited from interface javax.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Methods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addAttribute, addChildElement, addNamespaceDeclaration, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle
-
-
-
-
Constructor Detail
-
SOAPHeaderImpl
public SOAPHeaderImpl(SOAPHeader header)
Constructor- Parameters:
header
-
-
-
Method Detail
-
addChildElement
public SOAPElement addChildElement(String localName) throws SOAPException
- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classSOAPElementImpl<SOAPHeader>
- Throws:
SOAPException
-
addChildElement
public SOAPElement addChildElement(String localName, String prefix) throws SOAPException
- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classSOAPElementImpl<SOAPHeader>
- Throws:
SOAPException
-
addChildElement
public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classSOAPElementImpl<SOAPHeader>
- Throws:
SOAPException
-
addChildElement
public SOAPElement addChildElement(Name name) throws SOAPException
- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classSOAPElementImpl<SOAPHeader>
- Throws:
SOAPException
-
addChildElement
public SOAPElement addChildElement(SOAPElement soapElement) throws SOAPException
- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classSOAPElementImpl<SOAPHeader>
- Throws:
SOAPException
-
appendElement
protected Element appendElement(Element child) throws SOAPException
- Overrides:
appendElement
in classProxyNode<Element,SOAPHeader>
- Throws:
SOAPException
-
addHeaderElement
public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException
Creates a newSOAPHeaderElement
object initialized with the specified name and adds it to thisSOAPHeader
object.- Specified by:
addHeaderElement
in interfaceSOAPHeader
- Parameters:
name
- aName
object with the name of the newSOAPHeaderElement
object- Returns:
- the new
SOAPHeaderElement
object that was inserted into thisSOAPHeader
object - Throws:
SOAPException
- if a SOAP error occurs
-
examineHeaderElements
public Iterator examineHeaderElements(String actor)
Returns a list of all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the the specified actor. An actor is a global attribute that indicates the intermediate parties to whom the message should be sent. An actor receives the message and then sends it to the next actor. The default actor is the ultimate intended recipient for the message, so if no actor attribute is included in aSOAPHeader
object, the message is sent to its ultimate destination.- Specified by:
examineHeaderElements
in interfaceSOAPHeader
- Parameters:
actor
- aString
giving the URI of the actor for which to search- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects that contain the specified actor - See Also:
extractHeaderElements(java.lang.String)
-
extractHeaderElements
public Iterator extractHeaderElements(String actor)
Returns a list of all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the the specified actor and detaches them from thisSOAPHeader
object.This method allows an actor to process only the parts of the
SOAPHeader
object that apply to it and to remove them before passing the message on to the next actor.- Specified by:
extractHeaderElements
in interfaceSOAPHeader
- Parameters:
actor
- aString
giving the URI of the actor for which to search- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects that contain the specified actor - See Also:
examineHeaderElements(java.lang.String)
-
examineMustUnderstandHeaderElements
public Iterator examineMustUnderstandHeaderElements(String actor)
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent totrue
.- Specified by:
examineMustUnderstandHeaderElements
in interfaceSOAPHeader
- Parameters:
actor
- aString
giving the URI of the actor for which to search- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects that contain the specified actor and are marked as MustUnderstand
-
examineAllHeaderElements
public Iterator examineAllHeaderElements()
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object.- Specified by:
examineAllHeaderElements
in interfaceSOAPHeader
- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects contained by thisSOAPHeader
-
extractAllHeaderElements
public Iterator extractAllHeaderElements()
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object and detaches them from thisSOAPHeader
object.- Specified by:
extractAllHeaderElements
in interfaceSOAPHeader
- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects contained by thisSOAPHeader
-
addHeaderElement
public SOAPHeaderElement addHeaderElement(QName qname) throws SOAPException
- Specified by:
addHeaderElement
in interfaceSOAPHeader
- Throws:
SOAPException
-
addNotUnderstoodHeaderElement
public SOAPHeaderElement addNotUnderstoodHeaderElement(QName qname) throws SOAPException
Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object. This operation is supported only by SOAP 1.2- Specified by:
addNotUnderstoodHeaderElement
in interfaceSOAPHeader
- Parameters:
name
- - a QName object with the name of the SOAPHeaderElement object that was not understood.- Returns:
- the new SOAPHeaderElement object that was inserted into this SOAPHeader object
- Throws:
SOAPException
-
addUpgradeHeaderElement
public SOAPHeaderElement addUpgradeHeaderElement(Iterator iterator) throws SOAPException
Creates a new Upgrade SOAPHeaderElement object initialized with the specified List of supported SOAP URIs and adds it to this SOAPHeader object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.- Specified by:
addUpgradeHeaderElement
in interfaceSOAPHeader
- Parameters:
supportedSOAPURIs
- - an Iterator object with the URIs of SOAP versions supported.- Returns:
- the new SOAPHeaderElement object that was inserted into this SOAPHeader object
- Throws:
SOAPException
- - if a SOAP error occurs.
-
addUpgradeHeaderElement
public SOAPHeaderElement addUpgradeHeaderElement(String[] as) throws SOAPException
- Specified by:
addUpgradeHeaderElement
in interfaceSOAPHeader
- Throws:
SOAPException
-
addUpgradeHeaderElement
public SOAPHeaderElement addUpgradeHeaderElement(String s) throws SOAPException
- Specified by:
addUpgradeHeaderElement
in interfaceSOAPHeader
- Throws:
SOAPException
-
addTextNode
public SOAPElement addTextNode(String text) throws SOAPException
Description copied from class:SOAPElementImpl
Creates a newText
object initialized with the givenString
and adds it to thisSOAPElement
object.- Specified by:
addTextNode
in interfaceSOAPElement
- Overrides:
addTextNode
in classSOAPElementImpl<SOAPHeader>
- Parameters:
text
- aString
object with the textual content to be added- Returns:
- the
SOAPElement
object into which the newText
object was inserted - Throws:
SOAPException
- if there is an error in creating the newText
object
-
getChildElements
public Iterator getChildElements(Name name)
- Specified by:
getChildElements
in interfaceSOAPElement
- Overrides:
getChildElements
in classSOAPElementImpl<SOAPHeader>
-
getChildElements
public Iterator getChildElements()
Description copied from class:SOAPElementImpl
Returns an iterator over all the immediate content of this element. This includesText
objects as well asSOAPElement
objects.- Specified by:
getChildElements
in interfaceSOAPElement
- Overrides:
getChildElements
in classSOAPElementImpl<SOAPHeader>
- Returns:
- an iterator over
Text
andSOAPElement
contained within thisSOAPElement
object
-
-