public abstract class SOAPHeaderImpl extends SOAPElement implements SOAPHeader
attributes, builder, firstChild, lastChild, localName, namespaces, ns, qName, state
nextSibling, parent, previousSibling
factory
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
COMPLETE, DISCARDED, INCOMPLETE
ARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DATA_HANDLER, DEFAULT_CHAR_SET_ENCODING, DEFAULT_DEFAULT_NAMESPACE, DEFAULT_XML_VERSION, IS_BINARY, IS_DATA_HANDLERS_AWARE, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLATTRTYPE_CDATA, XMLATTRTYPE_ENTITIES, XMLATTRTYPE_ENTITY, XMLATTRTYPE_ID, XMLATTRTYPE_IDREF, XMLATTRTYPE_IDREFS, XMLATTRTYPE_NMTOKEN, XMLATTRTYPE_NMTOKENS, XMLATTRTYPE_NOTATION, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI
Modifier | Constructor and Description |
---|---|
protected |
SOAPHeaderImpl(OMNamespace ns,
SOAPFactory factory) |
|
SOAPHeaderImpl(SOAPEnvelope envelope,
OMXMLParserWrapper builder,
SOAPFactory factory)
Constructor SOAPHeaderImpl
|
|
SOAPHeaderImpl(SOAPEnvelope envelope,
SOAPFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(OMNode child,
boolean fromBuilder) |
SOAPHeaderBlock |
addHeaderBlock(String localName,
OMNamespace ns)
Creates a new
SOAPHeaderBlock object initialized with the specified name and adds it
to this SOAPHeader object. |
protected void |
checkParent(OMElement parent)
This has to be implemented by all the derived classes to check for the correct parent.
|
protected OMElement |
createClone(OMCloneOptions options,
OMContainer targetParent) |
Iterator |
examineAllHeaderBlocks()
Returns an iterator over all the
SOAPHeaderBlock objects in this SOAPHeader
object. |
Iterator |
examineHeaderBlocks(String role)
Returns a list of all the
SOAPHeaderBlock objects in this SOAPHeader object
that have the the specified role. |
Iterator |
examineMustUnderstandHeaderBlocks(String actor)
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 . |
static String |
exceptionToString(Throwable e) |
Iterator |
extractAllHeaderBlocks()
Returns an iterator over all the
SOAPHeaderBlock objects in this SOAPHeader
object and detaches them from this SOAPHeader object. |
abstract Iterator |
extractHeaderBlocks(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. |
ArrayList |
getHeaderBlocksWithNSURI(String nsURI)
Return all the Headers that has the Namespace URI to given NS URI.
|
Iterator |
getHeadersToProcess(RolePlayer rolePlayer)
Get the appropriate set of headers for a
RolePlayer . |
Iterator |
getHeadersToProcess(RolePlayer rolePlayer,
String namespace)
Get the appropriate set of headers for a RolePlayer and a particular namespace.
|
registerContentHandler, setParent
addAttribute, addAttribute, addChild, addNamespaceDeclaration, build, buildWithAttachments, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, detach, discard, discarded, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getBuilder, getChildElements, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDefaultNamespace, getDescendants, getFirstChildWithName, getFirstElement, getFirstOMChild, getFirstOMChildIfAvailable, getLastKnownOMChild, getLineNumber, getLocalName, getNamespace, getNamespaceContext, getNamespacesInScope, getNamespaceURI, getPrefix, getQName, getSAXSource, getState, getText, getTextAsQName, getTextAsStream, getType, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, internalSerialize, isComplete, removeAttribute, removeChildren, resolveQName, setBuilder, setComplete, setFirstChild, setLastChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume, undeclarePrefix, writeTextTo
clone, getIParentNode, getNextOMSibling, getNextOMSiblingIfAvailable, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, setNextOMSibling, setPreviousOMSibling
close, getOMFactory, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getNamespaceContext, getNamespacesInScope, getText, getTextAsQName, getTextAsStream, removeAttribute, resolveQName, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setBuilder, setLineNumber, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume, undeclarePrefix, writeTextTo
buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore
addChild, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendants, getFirstChildWithName, getFirstOMChild, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeChildren
build, close, isComplete, serialize, serialize, serializeAndConsume
clone, getOMFactory
getLocalName, getNamespace, getNamespaceURI, getPrefix, getQName, setLocalName
getIParentNode
getNextOMSiblingIfAvailable, internalSerialize, internalSerializeAndConsume, setNextOMSibling, setPreviousOMSibling
protected SOAPHeaderImpl(OMNamespace ns, SOAPFactory factory)
public SOAPHeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException
SOAPProcessingException
public SOAPHeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory)
envelope
- builder
- public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException
SOAPHeader
SOAPHeaderBlock
object initialized with the specified name and adds it
to this SOAPHeader
object.addHeaderBlock
in interface SOAPHeader
localName
- the local name of the header blockns
- the namespace of the header block; must not be null
and must specify
a non empty namespace URISOAPHeaderBlock
object that was inserted into this SOAPHeader
objectOMException
- if an error occurs, e.g. if no namespace was specifiedpublic Iterator getHeadersToProcess(RolePlayer rolePlayer)
SOAPHeader
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.
getHeadersToProcess
in interface SOAPHeader
rolePlayer
- the RolePlayer
object specifying the role configurationSOAPHeaderBlock
objects the RolePlayer should
processpublic Iterator getHeadersToProcess(RolePlayer rolePlayer, String namespace)
SOAPHeader
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".
getHeadersToProcess
in interface SOAPHeader
rolePlayer
- the RolePlayer
object specifying the role configurationnamespace
- if specified, we'll only return headers from this namespaceSOAPHeaderBlock
objects the RolePlayer should
processpublic Iterator examineHeaderBlocks(String role)
SOAPHeader
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. 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 a SOAPHeaderBlock
object, the message
is sent to its ultimate destination.examineHeaderBlocks
in interface SOAPHeader
role
- the URI of the role for which to searchSOAPHeaderBlock
objects that contain the specified
roleSOAPHeader.extractHeaderBlocks(String)
public abstract Iterator extractHeaderBlocks(String role)
SOAPHeader
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.
extractHeaderBlocks
in interface SOAPHeader
role
- the URI of the role for which to searchSOAPHeaderBlock
objects that contain the specified
roleSOAPHeader.examineHeaderBlocks(String)
public Iterator examineMustUnderstandHeaderBlocks(String actor)
SOAPHeader
SOAPHeaderBlock
objects in this SOAPHeader
object that have the specified role and that have a MustUnderstand attribute whose
value is equivalent to true
.examineMustUnderstandHeaderBlocks
in interface SOAPHeader
actor
- the URI of the role for which to searchSOAPHeaderBlock
objects that contain the specified
role and are marked as MustUnderstand.public Iterator examineAllHeaderBlocks()
SOAPHeader
SOAPHeaderBlock
objects in this SOAPHeader
object.examineAllHeaderBlocks
in interface SOAPHeader
SOAPHeaderBlock
objects contained by this
SOAPHeader
. If there are no header blocks then an empty iterator is returned.public Iterator extractAllHeaderBlocks()
SOAPHeader
SOAPHeaderBlock
objects in this SOAPHeader
object and detaches them from this SOAPHeader
object.extractAllHeaderBlocks
in interface SOAPHeader
SOAPHeaderBlock
objects contained by this
SOAPHeader
public ArrayList getHeaderBlocksWithNSURI(String nsURI)
SOAPHeader
getHeaderBlocksWithNSURI
in interface SOAPHeader
protected void checkParent(OMElement parent) throws SOAPProcessingException
SOAPElement
checkParent
in class SOAPElement
SOAPProcessingException
public void addChild(OMNode child, boolean fromBuilder)
addChild
in interface OMContainerEx
addChild
in class OMElementImpl
protected OMElement createClone(OMCloneOptions options, OMContainer targetParent)
createClone
in class OMElementImpl
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.