Interface SOAPHeader
- All Superinterfaces:
OMContainer,OMElement,OMInformationItem,OMNamedInformationItem,OMNode,OMSerializable
-
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
Modifier and TypeMethodDescriptionaddHeaderBlock(String localName, OMNamespace ns) Creates a newSOAPHeaderBlockobject initialized with the specified name and adds it to thisSOAPHeaderobject.addHeaderBlock(QName qname) Creates a newSOAPHeaderBlockobject initialized with the specified name and adds it to thisSOAPHeaderobject.Returns an iterator over all theSOAPHeaderBlockobjects in thisSOAPHeaderobject.examineHeaderBlocks(String role) Returns a list of all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the the specified role.Returns an iterator over all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the specified role and that have aMustUnderstandattribute whose value is equivalent totrue.Returns an iterator over all theSOAPHeaderBlockobjects in thisSOAPHeaderobject and detaches them from thisSOAPHeaderobject.extractHeaderBlocks(String role) Returns a list of all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the the specified role and detaches them from thisSOAPHeaderobject.getHeaderBlocksWithName(QName name) Get all header blocks with the given name.Get all header blocks in the given namespace.getHeaderBlocksWithNSURI(String nsURI) Deprecated.getHeadersToProcess(RolePlayer rolePlayer) Get the appropriate set of headers for aRolePlayer.getHeadersToProcess(RolePlayer rolePlayer, String namespace) Get the appropriate set of headers for a RolePlayer and a particular namespace.Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getSAXResult, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, getXOPEncodedStreamReader, removeChildren, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumeMethods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getDescendants, getFirstElement, getLineNumber, getNamespaceContext, getNamespacesInScope, getText, getTextAsQName, getTextAsStream, removeAttribute, resolveQName, setLineNumber, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume, undeclarePrefix, writeTextToMethods inherited from interface org.apache.axiom.om.OMInformationItem
clone, getOMFactoryMethods inherited from interface org.apache.axiom.om.OMNamedInformationItem
getLocalName, getNamespace, getNamespaceURI, getPrefix, getQName, hasName, setLocalName, setNamespaceMethods inherited from interface org.apache.axiom.om.OMNode
buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBeforeMethods inherited from interface org.apache.axiom.om.OMSerializable
build, close, isComplete, serialize, serialize, serializeAndConsume
-
Method Details
-
addHeaderBlock
Creates a newSOAPHeaderBlockobject initialized with the specified name and adds it to thisSOAPHeaderobject.- Parameters:
localName- the local name of the header blockns- the namespace of the header block; must not benulland must specify a non empty namespace URI- Returns:
- the new
SOAPHeaderBlockobject that was inserted into thisSOAPHeaderobject - Throws:
OMException- if an error occurs, e.g. if no namespace was specified
-
addHeaderBlock
Creates a newSOAPHeaderBlockobject initialized with the specified name and adds it to thisSOAPHeaderobject.- Parameters:
qname- the name of the header block (which must have a non empty namespace URI)- Returns:
- the new
SOAPHeaderBlockobject that was inserted into thisSOAPHeaderobject - Throws:
OMException- if an error occurs, e.g. if the namespace URI specified by theQNameis empty
-
getHeadersToProcess
Get the appropriate set of headers for aRolePlayer.The
RolePlayerindicates 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.- Parameters:
rolePlayer- theRolePlayerobject specifying the role configuration- Returns:
- an iterator over all the
SOAPHeaderBlockobjects the RolePlayer should process
-
examineHeaderBlocks
Returns a list of all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the the specified role. An role is a global attribute that indicates the intermediate parties to whom the message should be sent. A 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 aSOAPHeaderBlockobject, the message is sent to its ultimate destination.- Parameters:
role- the URI of the role for which to search- Returns:
- an iterator over all the
SOAPHeaderBlockobjects that contain the specified role - See Also:
-
extractHeaderBlocks
Returns a list of all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the the specified role and detaches them from thisSOAPHeaderobject.This method allows an role to process only the parts of the
SOAPHeaderobject that apply to it and to remove them before passing the message on to the next role.- Parameters:
role- the URI of the role for which to search- Returns:
- an iterator over all the
SOAPHeaderBlockobjects that contain the specified role - See Also:
-
examineMustUnderstandHeaderBlocks
Returns an iterator over all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the specified role and that have aMustUnderstandattribute whose value is equivalent totrue.- Parameters:
role- the URI of the role for which to search- Returns:
- an iterator over all the
SOAPHeaderBlockobjects that contain the specified role and are marked as MustUnderstand.
-
examineAllHeaderBlocks
Iterator<SOAPHeaderBlock> examineAllHeaderBlocks()Returns an iterator over all theSOAPHeaderBlockobjects in thisSOAPHeaderobject.- Returns:
- An iterator over all the
SOAPHeaderBlockobjects contained by thisSOAPHeader. If there are no header blocks then an empty iterator is returned.
-
extractAllHeaderBlocks
Iterator<SOAPHeaderBlock> extractAllHeaderBlocks()Returns an iterator over all theSOAPHeaderBlockobjects in thisSOAPHeaderobject and detaches them from thisSOAPHeaderobject.- Returns:
- an iterator over all the
SOAPHeaderBlockobjects contained by thisSOAPHeader
-
getHeaderBlocksWithNSURI
Deprecated.UsegetHeaderBlocksWithNamespaceURI(String)instead.Return all the Headers that has the Namespace URI to given NS URI.- Parameters:
nsURI-- Returns:
- Returns ArrayList.
-
getHeaderBlocksWithNamespaceURI
Get all header blocks in the given namespace. This is similar toOMContainer.getChildrenWithNamespaceURI(String), but ensures that the returned nodes areSOAPHeaderBlockinstances.- Parameters:
uri- the namespace URI- Returns:
- an iterator with the matching header blocks
-
getHeaderBlocksWithName
Get all header blocks with the given name. This is similar toOMContainer.getChildrenWithName(QName), but ensures that the returned nodes areSOAPHeaderBlockinstances.- Parameters:
name- the QName specifying the namespace URI and local name to match.- Returns:
- an iterator with the matching header blocks
-
getHeadersToProcess
Get the appropriate set of headers for a RolePlayer and a particular namespace.The
RolePlayerindicates 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.This version of the API allows us to iterate only once over the headers searching for a particular namespace for headers targeted at "us".
- Parameters:
rolePlayer- theRolePlayerobject specifying the role configurationnamespace- if specified, we'll only return headers from this namespace- Returns:
- an iterator over all the
SOAPHeaderBlockobjects the RolePlayer should process
-
getHeaderBlocksWithNamespaceURI(String)instead.