org.apache.axis2.saaj
Class SOAPHeaderImpl

java.lang.Object
  extended byorg.apache.axis2.om.impl.dom.NodeImpl
      extended byorg.apache.axis2.saaj.NodeImplEx
          extended byorg.apache.axis2.saaj.SOAPElementImpl
              extended byorg.apache.axis2.saaj.SOAPHeaderImpl
All Implemented Interfaces:
Cloneable, Element, Node, Node, NodeList, OMNode, OMNodeEx, SOAPElement, SOAPHeader

public class SOAPHeaderImpl
extends SOAPElementImpl
implements SOAPHeader


Field Summary
 
Fields inherited from class org.apache.axis2.saaj.SOAPElementImpl
element
 
Fields inherited from class org.apache.axis2.om.impl.dom.NodeImpl
builder, done, FIRSTCHILD, flags, nodeType, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.apache.axis2.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Constructor Summary
SOAPHeaderImpl(SOAPHeader header)
          Constructor
 
Method Summary
 SOAPHeaderElement addHeaderElement(Name name)
          Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.
 Iterator examineAllHeaderElements()
          Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object.
 Iterator examineHeaderElements(String actor)
          Returns a list of all the SOAPHeaderElement objects in this SOAPHeader object that have the the specified actor.
 Iterator examineMustUnderstandHeaderElements(String actor)
          Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent to true.
 Iterator extractAllHeaderElements()
          Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object and detaches them from this SOAPHeader object.
 Iterator extractHeaderElements(String actor)
          Returns a list of all the SOAPHeaderElement objects in this SOAPHeader object that have the the specified actor and detaches them from this SOAPHeader object.
 
Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, discard, getAllAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributeValue, getChildElements, getChildElements, getChildNodes, getElement, getElementName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFirstChild, getLastChild, getNamespacePrefixes, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentElement, getPreviousSibling, getTagName, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasChildNodes, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, serialize, serializeAndConsume, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setParent
 
Methods inherited from class org.apache.axis2.saaj.NodeImplEx
detachNode, getParent, getType, recycleNode, setParentElement, setType, setValue
 
Methods inherited from class org.apache.axis2.om.impl.dom.NodeImpl
appendChild, build, cloneNode, compareDocumentPosition, detach, getAttributes, getBaseURI, getFeature, getLength, getLocalName, getNamespaceURI, getNextOMSibling, getNodeValue, getParentNode, getPrefix, getPreviousOMSibling, getTextContent, getUserData, hasAttributes, insertBefore, insertSiblingAfter, insertSiblingBefore, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeWithCache, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setPrefix, setPreviousOMSibling, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
 
Methods inherited from interface javax.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 

Constructor Detail

SOAPHeaderImpl

public SOAPHeaderImpl(SOAPHeader header)
Constructor

Parameters:
header -
Method Detail

addHeaderElement

public SOAPHeaderElement addHeaderElement(Name name)
                                   throws SOAPException
Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object.

Specified by:
addHeaderElement in interface SOAPHeader
Parameters:
name - a Name object with the name of the new SOAPHeaderElement object
Returns:
the new SOAPHeaderElement object that was inserted into this SOAPHeader object
Throws:
SOAPException - if a SOAP error occurs

examineHeaderElements

public Iterator examineHeaderElements(String actor)
Returns a list of all the SOAPHeaderElement objects in this SOAPHeader 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 a SOAPHeader object, the message is sent to its ultimate destination.

Specified by:
examineHeaderElements in interface SOAPHeader
Parameters:
actor - a String giving the URI of the actor for which to search
Returns:
an Iterator object over all the SOAPHeaderElement objects that contain the specified actor
See Also:
extractHeaderElements(java.lang.String)

extractHeaderElements

public Iterator extractHeaderElements(String actor)
Returns a list of all the SOAPHeaderElement objects in this SOAPHeader object that have the the specified actor and detaches them from this SOAPHeader 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 interface SOAPHeader
Parameters:
actor - a String giving the URI of the actor for which to search
Returns:
an Iterator object over all the SOAPHeaderElement objects that contain the specified actor
See Also:
examineHeaderElements(java.lang.String)

examineMustUnderstandHeaderElements

public Iterator examineMustUnderstandHeaderElements(String actor)
Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent to true.

Specified by:
examineMustUnderstandHeaderElements in interface SOAPHeader
Parameters:
actor - a String giving the URI of the actor for which to search
Returns:
an Iterator object over all the SOAPHeaderElement objects that contain the specified actor and are marked as MustUnderstand

examineAllHeaderElements

public Iterator examineAllHeaderElements()
Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object.

Specified by:
examineAllHeaderElements in interface SOAPHeader
Returns:
an Iterator object over all the SOAPHeaderElement objects contained by this SOAPHeader

extractAllHeaderElements

public Iterator extractAllHeaderElements()
Returns an Iterator over all the SOAPHeaderElement objects in this SOAPHeader object and detaches them from this SOAPHeader object.

Specified by:
extractAllHeaderElements in interface SOAPHeader
Returns:
an Iterator object over all the SOAPHeaderElement objects contained by this SOAPHeader