public abstract class HeaderImpl extends ElementImpl implements SOAPHeader
Modifier and Type | Field and Description |
---|---|
protected static boolean |
MUST_UNDERSTAND_ONLY |
DSIG_NS, elementQName, log, WSU_NS, XENC_NS, XML_URI, XMLNS_URI
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Modifier | Constructor and Description |
---|---|
|
HeaderImpl(SOAPDocumentImpl ownerDoc,
Element domElement) |
protected |
HeaderImpl(SOAPDocumentImpl ownerDoc,
NameImpl name) |
Modifier and Type | Method and Description |
---|---|
SOAPElement |
addChildElement(String localName)
Creates a new
SOAPElement object initialized with the
specified local name and adds the new element to this
SOAPElement object. |
protected SOAPElement |
addElement(Name name) |
protected SOAPElement |
addElement(QName name) |
SOAPHeaderElement |
addHeaderElement(Name name)
Creates a new
SOAPHeaderElement object initialized with the
specified name and adds it to this SOAPHeader object. |
SOAPHeaderElement |
addHeaderElement(QName name)
Creates a new
SOAPHeaderElement object initialized with the
specified qname and adds it to this SOAPHeader object. |
SOAPHeaderElement |
addUpgradeHeaderElement(Iterator supportedSoapUris)
Creates a new Upgrade
SOAPHeaderElement object initialized
with the specified List of supported SOAP URIs and adds it to this
SOAPHeader object. |
SOAPHeaderElement |
addUpgradeHeaderElement(String supportedSoapUri)
Creates a new Upgrade
SOAPHeaderElement object initialized
with the specified supported SOAP URI and adds it to this
SOAPHeader object. |
SOAPHeaderElement |
addUpgradeHeaderElement(String[] supportedSoapUris)
Creates a new Upgrade
SOAPHeaderElement object initialized
with the specified array of supported SOAP URIs and adds it to this
SOAPHeader object. |
protected SOAPElement |
convertToSoapElement(Element element) |
protected abstract SOAPHeaderElement |
createHeaderElement(Name name) |
protected abstract SOAPHeaderElement |
createHeaderElement(QName name) |
Iterator<SOAPHeaderElement> |
examineAllHeaderElements()
Returns an
Iterator over all the SOAPHeaderElement objects
in this SOAPHeader object. |
Iterator<SOAPHeaderElement> |
examineHeaderElements(String actor)
Returns an
Iterator over all the SOAPHeaderElement objects
in this SOAPHeader object
that have the specified actor. |
Iterator<SOAPHeaderElement> |
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<SOAPHeaderElement> |
extractAllHeaderElements()
Returns an
Iterator over all the SOAPHeaderElement objects
in this SOAPHeader object and detaches them
from this SOAPHeader object. |
Iterator<SOAPHeaderElement> |
extractHeaderElements(String actor)
Returns an
Iterator over all the SOAPHeaderElement objects
in this SOAPHeader object
that have the specified actor and detaches them
from this SOAPHeader object. |
protected Iterator<SOAPHeaderElement> |
getHeaderElements(String actor,
boolean detach,
boolean mustUnderstand) |
protected Iterator<SOAPHeaderElement> |
getHeaderElementsForActor(String actor,
boolean detach,
boolean mustUnderstand) |
protected abstract NameImpl |
getNotUnderstoodName() |
protected abstract NameImpl |
getSupportedEnvelopeName() |
protected abstract NameImpl |
getUpgradeName() |
SOAPElement |
setElementQName(QName newName)
Changes the name of this
Element to newName if
possible. |
void |
setParentElement(SOAPElement element)
Sets the parent of this
Node object to the given
SOAPElement object. |
addAttribute, addAttribute, addCDATA, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addNode, addText, addTextNode, appendChild, cloneNode, compareDocumentPosition, convertToSoapText, createElement, createElement, createQName, detachNode, doGetNamespacePrefixes, ensureNamespaceIsDeclared, findAndConvertChildElement, findChild, findEncodingStyleAttributeName, getAllAttributes, getAllAttributesAsQNames, getAllAttributesFrom, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getAttributeValue, getAttributeValueFrom, getBaseURI, getChildElementNodes, getChildElements, getChildElements, getChildElements, getChildElementsFrom, getChildNodes, getDomElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFeature, getFirstChild, getLastChild, getLocalName, getLocalPart, getNamespaceAttr, getNamespaceAttrFrom, getNamespaceContextNodes, getNamespaceContextNodes, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPrefix, getPreviousSibling, getQualifiedName, getSchemaTypeInfo, getSoapDocument, getSOAPNamespace, getTagName, getTextContent, getUserData, getValue, getValueNode, getValueNodeStrict, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, importElement, insertBefore, isDefaultNamespace, isEqualNode, isNamespaceQualified, isNamespaceQualified, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeContents, removeNamespaceDeclaration, replaceChild, replaceElementWithSOAPElement, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setEncodingStyleNamespace, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, setValue, tryToFindEncodingStyleAttributeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addNotUnderstoodHeaderElement
addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
detachNode, getParentElement, getValue, recycleNode, setValue
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
protected static final boolean MUST_UNDERSTAND_ONLY
protected HeaderImpl(SOAPDocumentImpl ownerDoc, NameImpl name)
public HeaderImpl(SOAPDocumentImpl ownerDoc, Element domElement)
protected abstract SOAPHeaderElement createHeaderElement(Name name) throws SOAPException
SOAPException
protected abstract SOAPHeaderElement createHeaderElement(QName name) throws SOAPException
SOAPException
protected abstract NameImpl getNotUnderstoodName()
protected abstract NameImpl getUpgradeName()
protected abstract NameImpl getSupportedEnvelopeName()
public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException
SOAPHeader
SOAPHeaderElement
object initialized with the
specified name and adds it to this SOAPHeader
object.addHeaderElement
in interface SOAPHeader
name
- a Name
object with the name of the new
SOAPHeaderElement
objectSOAPHeaderElement
object that was
inserted into this SOAPHeader
objectSOAPException
- if a SOAP error occursSOAPHeader.addHeaderElement(javax.xml.namespace.QName)
public SOAPHeaderElement addHeaderElement(QName name) throws SOAPException
SOAPHeader
SOAPHeaderElement
object initialized with the
specified qname and adds it to this SOAPHeader
object.addHeaderElement
in interface SOAPHeader
name
- a QName
object with the qname of the new
SOAPHeaderElement
objectSOAPHeaderElement
object that was
inserted into this SOAPHeader
objectSOAPException
- if a SOAP error occursSOAPHeader.addHeaderElement(Name)
protected SOAPElement addElement(Name name) throws SOAPException
addElement
in class ElementImpl
SOAPException
protected SOAPElement addElement(QName name) throws SOAPException
addElement
in class ElementImpl
SOAPException
public Iterator<SOAPHeaderElement> examineHeaderElements(String actor)
SOAPHeader
Iterator
over all the SOAPHeaderElement
objects
in this SOAPHeader
object
that have the specified actor.
An actor is a global attribute that indicates the intermediate
parties that should process a message before it reaches its ultimate
receiver. An actor receives the message and processes it before sending
it on 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, it is sent to the ultimate receiver
along with the message body.
In SOAP 1.2 the env:actor attribute is replaced by the env:role attribute, but with essentially the same semantics.
examineHeaderElements
in interface SOAPHeader
actor
- a String
giving the URI of the actor
/ role
for which to searchIterator
object over all the
SOAPHeaderElement
objects that contain the specified
actor
/ role
SOAPHeader.extractHeaderElements(java.lang.String)
,
SOAPConstants.URI_SOAP_ACTOR_NEXT
public Iterator<SOAPHeaderElement> extractHeaderElements(String actor)
SOAPHeader
Iterator
over all the SOAPHeaderElement
objects
in this SOAPHeader
object
that have the specified actor and detaches them
from this SOAPHeader
object.
This method allows an actor to process the parts of the
SOAPHeader
object that apply to it and to remove
them before passing the message on to the next actor.
In SOAP 1.2 the env:actor attribute is replaced by the env:role attribute, but with essentially the same semantics.
extractHeaderElements
in interface SOAPHeader
actor
- a String
giving the URI of the actor
/ role
for which to searchIterator
object over all the
SOAPHeaderElement
objects that contain the specified
actor
/ role
SOAPHeader.examineHeaderElements(java.lang.String)
,
SOAPConstants.URI_SOAP_ACTOR_NEXT
protected Iterator<SOAPHeaderElement> getHeaderElementsForActor(String actor, boolean detach, boolean mustUnderstand)
protected Iterator<SOAPHeaderElement> getHeaderElements(String actor, boolean detach, boolean mustUnderstand)
public void setParentElement(SOAPElement element) throws SOAPException
Node
Node
object to the given
SOAPElement
object.setParentElement
in class ElementImpl
element
- the SOAPElement
object to be set as
the parent of this Node
objectSOAPException
- if there is a problem in setting the
parent to the given elementNode.getParentElement()
public SOAPElement addChildElement(String localName) throws SOAPException
SOAPElement
SOAPElement
object initialized with the
specified local name and adds the new element to this
SOAPElement
object.
The new SOAPElement
inherits any in-scope default namespace.addChildElement
in interface SOAPElement
addChildElement
in class ElementImpl
localName
- a String
giving the local name for
the elementSOAPElement
object that was createdSOAPException
- if there is an error in creating the
SOAPElement
objectpublic Iterator<SOAPHeaderElement> examineAllHeaderElements()
SOAPHeader
Iterator
over all the SOAPHeaderElement
objects
in this SOAPHeader
object.examineAllHeaderElements
in interface SOAPHeader
Iterator
object over all the
SOAPHeaderElement
objects contained by this
SOAPHeader
SOAPHeader.extractAllHeaderElements()
public Iterator<SOAPHeaderElement> examineMustUnderstandHeaderElements(String actor)
SOAPHeader
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
.
In SOAP 1.2 the env:actor attribute is replaced by the env:role attribute, but with essentially the same semantics.
examineMustUnderstandHeaderElements
in interface SOAPHeader
actor
- a String
giving the URI of the actor
/ role
for which to searchIterator
object over all the
SOAPHeaderElement
objects that contain the specified
actor
/ role
and are marked as MustUnderstandSOAPHeader.examineHeaderElements(java.lang.String)
,
SOAPHeader.extractHeaderElements(java.lang.String)
,
SOAPConstants.URI_SOAP_ACTOR_NEXT
public Iterator<SOAPHeaderElement> extractAllHeaderElements()
SOAPHeader
Iterator
over all the SOAPHeaderElement
objects
in this SOAPHeader
object and detaches them
from this SOAPHeader
object.extractAllHeaderElements
in interface SOAPHeader
Iterator
object over all the
SOAPHeaderElement
objects contained by this
SOAPHeader
SOAPHeader.examineAllHeaderElements()
public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSoapUris) throws SOAPException
SOAPHeader
SOAPHeaderElement
object initialized
with the specified List of supported SOAP URIs and adds it to this
SOAPHeader
object.
This operation is supported on both SOAP 1.1 and SOAP 1.2 header.addUpgradeHeaderElement
in interface SOAPHeader
supportedSoapUris
- an Iterator
object with the URIs of SOAP
versions supported.SOAPHeaderElement
object that was
inserted into this SOAPHeader
objectSOAPException
- if a SOAP error occurs.public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri) throws SOAPException
SOAPHeader
SOAPHeaderElement
object initialized
with the specified supported SOAP URI and adds it to this
SOAPHeader
object.
This operation is supported on both SOAP 1.1 and SOAP 1.2 header.addUpgradeHeaderElement
in interface SOAPHeader
supportedSoapUri
- the URI of SOAP the version that is supported.SOAPHeaderElement
object that was
inserted into this SOAPHeader
objectSOAPException
- if a SOAP error occurs.public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris) throws SOAPException
SOAPHeader
SOAPHeaderElement
object initialized
with the specified array of supported SOAP URIs and adds it to this
SOAPHeader
object.
This operation is supported on both SOAP 1.1 and SOAP 1.2 header.addUpgradeHeaderElement
in interface SOAPHeader
supportedSoapUris
- an array of the URIs of SOAP versions supported.SOAPHeaderElement
object that was
inserted into this SOAPHeader
objectSOAPException
- if a SOAP error occurs.protected SOAPElement convertToSoapElement(Element element)
convertToSoapElement
in class ElementImpl
public SOAPElement setElementQName(QName newName) throws SOAPException
SOAPElement
Element
to newName
if
possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
etc. cannot have their names changed using this method. Any attempt to do
so will result in a SOAPException being thrown.
Callers should not rely on the element instance being renamed as is.
Implementations could end up copying the content of the
SOAPElement
to a renamed instance.
setElementQName
in interface SOAPElement
setElementQName
in class ElementImpl
newName
- the new name for the Element
.SOAPException
- if changing the name of this Element
is not allowed.Copyright © 2021 JBoss by Red Hat. All rights reserved.