org.apache.axiom.soap
Interface SOAPHeader

All Superinterfaces:
OMContainer, OMElement, OMNode

public interface SOAPHeader
extends OMElement

Interface SOAPHeader


Field Summary
 
Fields inherited from interface org.apache.axiom.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Method Summary
 SOAPHeaderBlock addHeaderBlock(java.lang.String localName, OMNamespace ns)
          Creates a new SOAPHeaderBlock object initialized with the specified name and adds it to this SOAPHeader object.
 java.util.Iterator examineAllHeaderBlocks()
          Returns an Iterator over all the SOAPHeaderBlock objects in this SOAPHeader object.
 java.util.Iterator examineHeaderBlocks(java.lang.String role)
          Returns a list of all the SOAPHeaderBlock objects in this SOAPHeader object that have the the specified role.
 java.util.Iterator examineMustUnderstandHeaderBlocks(java.lang.String role)
          Returns an Iterator over all the SOAPHeaderBlock objects in this SOAPHeader object that have the specified role and that have a MustUnderstand attribute whose value is equivalent to true.
 java.util.Iterator extractAllHeaderBlocks()
          Returns an Iterator over all the SOAPHeaderBlock objects in this SOAPHeader object and detaches them from this SOAPHeader object.
 java.util.Iterator extractHeaderBlocks(java.lang.String role)
          Returns a list of all the SOAPHeaderBlock objects in this SOAPHeader object that have the the specified role and detaches them from this SOAPHeader object.
 java.util.ArrayList getHeaderBlocksWithNSURI(java.lang.String nsURI)
          Return all the Headers that has the Namespace URI to given NS URI.
 java.util.Iterator getHeadersToProcess(RolePlayer rolePlayer)
          Get the appropriate set of headers for a RolePlayer.
 
Methods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getBuilder, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getText, getTextAsQName, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeAttribute, resolveQName, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume
 
Methods inherited from interface org.apache.axiom.om.OMNode
build, buildWithAttachments, detach, discard, getNextOMSibling, getOMFactory, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, buildNext, getChildren, getChildrenWithName, getFirstChildWithName, getFirstOMChild, isComplete
 

Method Detail

addHeaderBlock

public SOAPHeaderBlock addHeaderBlock(java.lang.String localName,
                                      OMNamespace ns)
                               throws OMException
Creates a new SOAPHeaderBlock object initialized with the specified name and adds it to this SOAPHeader object.

Parameters:
localName -
ns -
Returns:
the new SOAPHeaderBlock object that was inserted into this SOAPHeader object
Throws:
OMException - if a SOAP error occurs

getHeadersToProcess

public java.util.Iterator getHeadersToProcess(RolePlayer rolePlayer)
Get the appropriate set of headers for a RolePlayer. The RolePlayer indicates whether it is the ultimate destination (in which case headers with no role or the explicit UltimateDestination role will be included), and any non-standard roles it supports. Headers targeted to "next" will always be included, and those targeted to "none" (for SOAP 1.2) will never be included.

Returns:
an Iterator over all the HeaderBlocks this RolePlayer should process.

examineHeaderBlocks

public java.util.Iterator examineHeaderBlocks(java.lang.String role)
Returns a list of all the SOAPHeaderBlock objects in this SOAPHeader object that have the the specified role. An role is a global attribute that indicates the intermediate parties to whom the message should be sent. An role receives the message and then sends it to the next role. The default role is the ultimate intended recipient for the message, so if no role attribute is included in a SOAPHeader object, the message is sent to its ultimate destination.

Parameters:
role - a String giving the URI of the role for which to search
Returns:
Returns an Iterator object over all the SOAPHeaderBlock objects that contain the specified role
See Also:
extractHeaderBlocks(java.lang.String)

extractHeaderBlocks

public java.util.Iterator extractHeaderBlocks(java.lang.String role)
Returns a list of all the SOAPHeaderBlock objects in this SOAPHeader object that have the the specified role and detaches them from this SOAPHeader object.

This method allows an role 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 role.

Parameters:
role - a String giving the URI of the role for which to search
Returns:
Returns an Iterator object over all the SOAPHeaderBlock objects that contain the specified role
See Also:
examineHeaderBlocks(java.lang.String)

examineMustUnderstandHeaderBlocks

public java.util.Iterator examineMustUnderstandHeaderBlocks(java.lang.String role)
Returns an Iterator over all the SOAPHeaderBlock objects in this SOAPHeader object that have the specified role and that have a MustUnderstand attribute whose value is equivalent to true.

Parameters:
role - a String giving the URI of the role for which to search
Returns:
Returns an Iterator object over all the SOAPHeaderBlock objects that contain the specified role and are marked as MustUnderstand.

examineAllHeaderBlocks

public java.util.Iterator examineAllHeaderBlocks()
Returns an Iterator over all the SOAPHeaderBlock objects in this SOAPHeader object.

Returns:
an Iterator object over all the SOAPHeaderBlock objects contained by this SOAPHeader. If there are no header blocks then an empty iterator is returned.

extractAllHeaderBlocks

public java.util.Iterator extractAllHeaderBlocks()
Returns an Iterator over all the SOAPHeaderBlock objects in this SOAPHeader object and detaches them from this SOAPHeader object.

Returns:
Returns an Iterator object over all the SOAPHeaderBlock objects contained by this SOAPHeader

getHeaderBlocksWithNSURI

public java.util.ArrayList getHeaderBlocksWithNSURI(java.lang.String nsURI)
Return all the Headers that has the Namespace URI to given NS URI.

Parameters:
nsURI -
Returns:
Returns ArrayList.


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