Package org.apache.axiom.soap
Interface SOAPHeader
- All Superinterfaces:
OMContainer,OMElement,OMNode,OMSerializable
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
Modifier and TypeMethodDescriptionaddHeaderBlock(String localName, OMNamespace ns) Creates a newSOAPHeaderBlockobject initialized with the specified name and adds it to thisSOAPHeaderobject.Returns anIteratorover all theSOAPHeaderBlockobjects in thisSOAPHeaderobject.examineHeaderBlocks(String role) Returns a list of all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the the specified role.Returns anIteratorover all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the specified role and that have a MustUnderstand attribute whose value is equivalent totrue.Returns anIteratorover 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.getHeaderBlocksWithNSURI(String nsURI) Return all the Headers that has the Namespace URI to given NS URI.getHeadersToProcess(RolePlayer rolePlayer) Get the appropriate set of headers for a RolePlayer.getHeadersToProcess(RolePlayer rolePlayer, String namespace) Get the appropriate set of headers for a RolePlayer in a particular namespaceMethods inherited from interface org.apache.axiom.om.OMContainer
addChild, buildNext, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCachingMethods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getText, getTextAsQName, getXMLStreamReader, removeAttribute, resolveQName, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsumeMethods 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, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
-
Method Details
-
addHeaderBlock
Creates a newSOAPHeaderBlockobject initialized with the specified name and adds it to thisSOAPHeaderobject.- Parameters:
localName-ns-- Returns:
- the new
SOAPHeaderBlockobject that was inserted into thisSOAPHeaderobject - Throws:
OMException- if a SOAP error occurs
-
getHeadersToProcess
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
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. 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 aSOAPHeaderobject, the message is sent to its ultimate destination.- Parameters:
role- aStringgiving the URI of the role for which to search- Returns:
- Returns an
Iteratorobject over all theSOAPHeaderBlockobjects 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 theSOAPHeaderobject that apply to it and to remove them before passing the message on to the next role.- Parameters:
role- aStringgiving the URI of the role for which to search- Returns:
- Returns an
Iteratorobject over all theSOAPHeaderBlockobjects that contain the specified role - See Also:
-
examineMustUnderstandHeaderBlocks
Returns anIteratorover all theSOAPHeaderBlockobjects in thisSOAPHeaderobject that have the specified role and that have a MustUnderstand attribute whose value is equivalent totrue.- Parameters:
role- aStringgiving the URI of the role for which to search- Returns:
- Returns an
Iteratorobject over all theSOAPHeaderBlockobjects that contain the specified role and are marked as MustUnderstand.
-
examineAllHeaderBlocks
Iterator examineAllHeaderBlocks()Returns anIteratorover all theSOAPHeaderBlockobjects in thisSOAPHeaderobject.- Returns:
- an
Iteratorobject over all theSOAPHeaderBlockobjects contained by thisSOAPHeader. If there are no header blocks then an empty iterator is returned.
-
extractAllHeaderBlocks
Iterator extractAllHeaderBlocks()Returns anIteratorover all theSOAPHeaderBlockobjects in thisSOAPHeaderobject and detaches them from thisSOAPHeaderobject.- Returns:
- Returns an
Iteratorobject over all theSOAPHeaderBlockobjects contained by thisSOAPHeader
-
getHeaderBlocksWithNSURI
Return all the Headers that has the Namespace URI to given NS URI.- Parameters:
nsURI-- Returns:
- Returns ArrayList.
-
getHeadersToProcess
Get the appropriate set of headers for a RolePlayer in a particular namespace 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. 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- a RolePlayer containing our role configurationnamespace- if specified, we'll only return headers from this namespace- Returns:
- an Iterator over all the HeaderBlocks this RolePlayer should process.
-