- All Implemented Interfaces:
Node
,SOAPBodyElement
,SOAPElement
,SOAPHeader
,Element
,Node
- Direct Known Subclasses:
Header1_1Impl
,Header1_2Impl
-
Field Summary
Fields inherited from class com.sun.xml.messaging.saaj.soap.impl.ElementImpl
DSIG_NS, elementQName, WSU_NS, XENC_NS
Fields inherited from interface org.w3c.dom.Node
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
-
Constructor Summary
ModifierConstructorDescriptionprotected
HeaderImpl
(SOAPDocumentImpl ownerDoc, NameImpl name) protected
HeaderImpl
(SOAPDocumentImpl ownerDoc, Element domElement) -
Method Summary
Modifier and TypeMethodDescriptionaddChildElement
(String localName) Creates a newSOAPElement
object initialized with the specified local name and adds the new element to thisSOAPElement
object.protected SOAPElement
addElement
(Name name) protected SOAPElement
addElement
(QName name) addHeaderElement
(Name name) Creates a newSOAPHeaderElement
object initialized with the specified name and adds it to thisSOAPHeader
object.addHeaderElement
(QName name) Creates a newSOAPHeaderElement
object initialized with the specified qname and adds it to thisSOAPHeader
object.addUpgradeHeaderElement
(String supportedSoapUri) Creates a new UpgradeSOAPHeaderElement
object initialized with the specified supported SOAP URI and adds it to thisSOAPHeader
object.addUpgradeHeaderElement
(String[] supportedSoapUris) Creates a new UpgradeSOAPHeaderElement
object initialized with the specified array of supported SOAP URIs and adds it to thisSOAPHeader
object.addUpgradeHeaderElement
(Iterator<String> supportedSoapUris) Creates a new UpgradeSOAPHeaderElement
object initialized with the specified List of supported SOAP URIs and adds it to thisSOAPHeader
object.protected SOAPElement
convertToSoapElement
(Element element) protected abstract SOAPHeaderElement
createHeaderElement
(Name name) protected abstract SOAPHeaderElement
createHeaderElement
(QName name) Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object.examineHeaderElements
(String actor) Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the specified actor.Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent totrue
.Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object and detaches them from thisSOAPHeader
object.extractHeaderElements
(String actor) Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the specified actor and detaches them from thisSOAPHeader
object.protected Iterator
<SOAPHeaderElement> getHeaderElements
(String actor, boolean detach, boolean mustUnderstand) protected Iterator
<SOAPHeaderElement> getHeaderElementsForActor
(String actor, boolean detach, boolean mustUnderstand) protected abstract NameImpl
protected abstract NameImpl
protected abstract NameImpl
setElementQName
(QName newName) Changes the name of thisElement
tonewName
if possible.void
setParentElement
(SOAPElement element) Sets the parent of thisNode
object to the givenSOAPElement
object.Methods inherited from class com.sun.xml.messaging.saaj.soap.impl.ElementImpl
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
Methods inherited from interface jakarta.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setValue
Methods inherited from interface org.w3c.dom.Node
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
Methods inherited from interface jakarta.xml.soap.SOAPElement
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
Methods inherited from interface jakarta.xml.soap.SOAPHeader
addNotUnderstoodHeaderElement
-
Field Details
-
MUST_UNDERSTAND_ONLY
protected static final boolean MUST_UNDERSTAND_ONLY- See Also:
-
-
Constructor Details
-
HeaderImpl
-
HeaderImpl
-
-
Method Details
-
createHeaderElement
- Throws:
SOAPException
-
createHeaderElement
- Throws:
SOAPException
-
getNotUnderstoodName
-
getUpgradeName
-
getSupportedEnvelopeName
-
addHeaderElement
Description copied from interface:SOAPHeader
Creates a newSOAPHeaderElement
object initialized with the specified name and adds it to thisSOAPHeader
object.- Specified by:
addHeaderElement
in interfaceSOAPHeader
- Parameters:
name
- aName
object with the name of the newSOAPHeaderElement
object- Returns:
- the new
SOAPHeaderElement
object that was inserted into thisSOAPHeader
object - Throws:
SOAPException
- if a SOAP error occurs- See Also:
-
addHeaderElement
Description copied from interface:SOAPHeader
Creates a newSOAPHeaderElement
object initialized with the specified qname and adds it to thisSOAPHeader
object.- Specified by:
addHeaderElement
in interfaceSOAPHeader
- Parameters:
name
- aQName
object with the qname of the newSOAPHeaderElement
object- Returns:
- the new
SOAPHeaderElement
object that was inserted into thisSOAPHeader
object - Throws:
SOAPException
- if a SOAP error occurs- See Also:
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
examineHeaderElements
Description copied from interface:SOAPHeader
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
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.
- Specified by:
examineHeaderElements
in interfaceSOAPHeader
- Parameters:
actor
- aString
giving the URI of theactor
/role
for which to search- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects that contain the specifiedactor
/role
- See Also:
-
extractHeaderElements
Description copied from interface:SOAPHeader
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the specified actor and detaches them from thisSOAPHeader
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.
- Specified by:
extractHeaderElements
in interfaceSOAPHeader
- Parameters:
actor
- aString
giving the URI of theactor
/role
for which to search- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects that contain the specifiedactor
/role
- See Also:
-
getHeaderElementsForActor
protected Iterator<SOAPHeaderElement> getHeaderElementsForActor(String actor, boolean detach, boolean mustUnderstand) -
getHeaderElements
protected Iterator<SOAPHeaderElement> getHeaderElements(String actor, boolean detach, boolean mustUnderstand) -
setParentElement
Description copied from interface:Node
Sets the parent of thisNode
object to the givenSOAPElement
object.- Specified by:
setParentElement
in interfaceNode
- Overrides:
setParentElement
in classElementImpl
- Parameters:
element
- theSOAPElement
object to be set as the parent of thisNode
object- Throws:
SOAPException
- if there is a problem in setting the parent to the given element- See Also:
-
addChildElement
Description copied from interface:SOAPElement
Creates a newSOAPElement
object initialized with the specified local name and adds the new element to thisSOAPElement
object. The newSOAPElement
inherits any in-scope default namespace.- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classElementImpl
- Parameters:
localName
- aString
giving the local name for the element- Returns:
- the new
SOAPElement
object that was created - Throws:
SOAPException
- if there is an error in creating theSOAPElement
object
-
examineAllHeaderElements
Description copied from interface:SOAPHeader
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object.- Specified by:
examineAllHeaderElements
in interfaceSOAPHeader
- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects contained by thisSOAPHeader
- See Also:
-
examineMustUnderstandHeaderElements
Description copied from interface:SOAPHeader
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object that have the specified actor and that have a MustUnderstand attribute whose value is equivalent totrue
.In SOAP 1.2 the env:actor attribute is replaced by the env:role attribute, but with essentially the same semantics.
- Specified by:
examineMustUnderstandHeaderElements
in interfaceSOAPHeader
- Parameters:
actor
- aString
giving the URI of theactor
/role
for which to search- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects that contain the specifiedactor
/role
and are marked as MustUnderstand - See Also:
-
extractAllHeaderElements
Description copied from interface:SOAPHeader
Returns anIterator
over all theSOAPHeaderElement
objects in thisSOAPHeader
object and detaches them from thisSOAPHeader
object.- Specified by:
extractAllHeaderElements
in interfaceSOAPHeader
- Returns:
- an
Iterator
object over all theSOAPHeaderElement
objects contained by thisSOAPHeader
- See Also:
-
addUpgradeHeaderElement
public SOAPHeaderElement addUpgradeHeaderElement(Iterator<String> supportedSoapUris) throws SOAPException Description copied from interface:SOAPHeader
Creates a new UpgradeSOAPHeaderElement
object initialized with the specified List of supported SOAP URIs and adds it to thisSOAPHeader
object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.- Specified by:
addUpgradeHeaderElement
in interfaceSOAPHeader
- Parameters:
supportedSoapUris
- anIterator
object with the URIs of SOAP versions supported.- Returns:
- the new
SOAPHeaderElement
object that was inserted into thisSOAPHeader
object - Throws:
SOAPException
- if a SOAP error occurs.
-
addUpgradeHeaderElement
Description copied from interface:SOAPHeader
Creates a new UpgradeSOAPHeaderElement
object initialized with the specified supported SOAP URI and adds it to thisSOAPHeader
object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.- Specified by:
addUpgradeHeaderElement
in interfaceSOAPHeader
- Parameters:
supportedSoapUri
- the URI of SOAP the version that is supported.- Returns:
- the new
SOAPHeaderElement
object that was inserted into thisSOAPHeader
object - Throws:
SOAPException
- if a SOAP error occurs.
-
addUpgradeHeaderElement
Description copied from interface:SOAPHeader
Creates a new UpgradeSOAPHeaderElement
object initialized with the specified array of supported SOAP URIs and adds it to thisSOAPHeader
object. This operation is supported on both SOAP 1.1 and SOAP 1.2 header.- Specified by:
addUpgradeHeaderElement
in interfaceSOAPHeader
- Parameters:
supportedSoapUris
- an array of the URIs of SOAP versions supported.- Returns:
- the new
SOAPHeaderElement
object that was inserted into thisSOAPHeader
object - Throws:
SOAPException
- if a SOAP error occurs.
-
convertToSoapElement
- Overrides:
convertToSoapElement
in classElementImpl
-
setElementQName
Description copied from interface:SOAPElement
Changes the name of thisElement
tonewName
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.- Specified by:
setElementQName
in interfaceSOAPElement
- Overrides:
setElementQName
in classElementImpl
- Parameters:
newName
- the new name for theElement
.- Returns:
- The renamed Node
- Throws:
SOAPException
- if changing the name of thisElement
is not allowed.
-