SOAPHeaderElement (Java Platform SE 8 ) (original) (raw)
- All Superinterfaces:
Element, Node, SOAPElement
public interface SOAPHeaderElement
extends SOAPElement
An object representing the contents in the SOAP header part of the SOAP envelope. The immediate children of a SOAPHeader
object can be represented only as SOAPHeaderElement
objects.
A SOAPHeaderElement
object can have otherSOAPElement
objects as its children.
Field Summary
* ### Fields inherited from interface org.w3c.dom.[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") `[ATTRIBUTE_NODE](../../../org/w3c/dom/Node.html#ATTRIBUTE%5FNODE), [CDATA_SECTION_NODE](../../../org/w3c/dom/Node.html#CDATA%5FSECTION%5FNODE), [COMMENT_NODE](../../../org/w3c/dom/Node.html#COMMENT%5FNODE), [DOCUMENT_FRAGMENT_NODE](../../../org/w3c/dom/Node.html#DOCUMENT%5FFRAGMENT%5FNODE), [DOCUMENT_NODE](../../../org/w3c/dom/Node.html#DOCUMENT%5FNODE), [DOCUMENT_POSITION_CONTAINED_BY](../../../org/w3c/dom/Node.html#DOCUMENT%5FPOSITION%5FCONTAINED%5FBY), [DOCUMENT_POSITION_CONTAINS](../../../org/w3c/dom/Node.html#DOCUMENT%5FPOSITION%5FCONTAINS), [DOCUMENT_POSITION_DISCONNECTED](../../../org/w3c/dom/Node.html#DOCUMENT%5FPOSITION%5FDISCONNECTED), [DOCUMENT_POSITION_FOLLOWING](../../../org/w3c/dom/Node.html#DOCUMENT%5FPOSITION%5FFOLLOWING), [DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC](../../../org/w3c/dom/Node.html#DOCUMENT%5FPOSITION%5FIMPLEMENTATION%5FSPECIFIC), [DOCUMENT_POSITION_PRECEDING](../../../org/w3c/dom/Node.html#DOCUMENT%5FPOSITION%5FPRECEDING), [DOCUMENT_TYPE_NODE](../../../org/w3c/dom/Node.html#DOCUMENT%5FTYPE%5FNODE), [ELEMENT_NODE](../../../org/w3c/dom/Node.html#ELEMENT%5FNODE), [ENTITY_NODE](../../../org/w3c/dom/Node.html#ENTITY%5FNODE), [ENTITY_REFERENCE_NODE](../../../org/w3c/dom/Node.html#ENTITY%5FREFERENCE%5FNODE), [NOTATION_NODE](../../../org/w3c/dom/Node.html#NOTATION%5FNODE), [PROCESSING_INSTRUCTION_NODE](../../../org/w3c/dom/Node.html#PROCESSING%5FINSTRUCTION%5FNODE), [TEXT_NODE](../../../org/w3c/dom/Node.html#TEXT%5FNODE)`
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method Description String getActor() Returns the uri of the actor attribute of thisSOAPHeaderElement. boolean getMustUnderstand() Returns the boolean value of the mustUnderstand attribute for thisSOAPHeaderElement. boolean getRelay() Returns the boolean value of the relay attribute for thisSOAPHeaderElement String getRole() Returns the value of the Role attribute of thisSOAPHeaderElement. void setActor(String actorURI) Sets the actor associated with this SOAPHeaderElement object to the specified actor. void setMustUnderstand(boolean mustUnderstand) Sets the mustUnderstand attribute for this SOAPHeaderElement object to be either true or false. void setRelay(boolean relay) Sets the relay attribute for this SOAPHeaderElement to be either true or false. void setRole(String uri) Sets the Role associated with this SOAPHeaderElement object to the specified Role. * ### Methods inherited from interface javax.xml.soap.[SOAPElement](../../../javax/xml/soap/SOAPElement.html "interface in javax.xml.soap") `[addAttribute](../../../javax/xml/soap/SOAPElement.html#addAttribute-javax.xml.soap.Name-java.lang.String-), [addAttribute](../../../javax/xml/soap/SOAPElement.html#addAttribute-javax.xml.namespace.QName-java.lang.String-), [addChildElement](../../../javax/xml/soap/SOAPElement.html#addChildElement-javax.xml.soap.Name-), [addChildElement](../../../javax/xml/soap/SOAPElement.html#addChildElement-javax.xml.namespace.QName-), [addChildElement](../../../javax/xml/soap/SOAPElement.html#addChildElement-javax.xml.soap.SOAPElement-), [addChildElement](../../../javax/xml/soap/SOAPElement.html#addChildElement-java.lang.String-), [addChildElement](../../../javax/xml/soap/SOAPElement.html#addChildElement-java.lang.String-java.lang.String-), [addChildElement](../../../javax/xml/soap/SOAPElement.html#addChildElement-java.lang.String-java.lang.String-java.lang.String-), [addNamespaceDeclaration](../../../javax/xml/soap/SOAPElement.html#addNamespaceDeclaration-java.lang.String-java.lang.String-), [addTextNode](../../../javax/xml/soap/SOAPElement.html#addTextNode-java.lang.String-), [createQName](../../../javax/xml/soap/SOAPElement.html#createQName-java.lang.String-java.lang.String-), [getAllAttributes](../../../javax/xml/soap/SOAPElement.html#getAllAttributes--), [getAllAttributesAsQNames](../../../javax/xml/soap/SOAPElement.html#getAllAttributesAsQNames--), [getAttributeValue](../../../javax/xml/soap/SOAPElement.html#getAttributeValue-javax.xml.soap.Name-), [getAttributeValue](../../../javax/xml/soap/SOAPElement.html#getAttributeValue-javax.xml.namespace.QName-), [getChildElements](../../../javax/xml/soap/SOAPElement.html#getChildElements--), [getChildElements](../../../javax/xml/soap/SOAPElement.html#getChildElements-javax.xml.soap.Name-), [getChildElements](../../../javax/xml/soap/SOAPElement.html#getChildElements-javax.xml.namespace.QName-), [getElementName](../../../javax/xml/soap/SOAPElement.html#getElementName--), [getElementQName](../../../javax/xml/soap/SOAPElement.html#getElementQName--), [getEncodingStyle](../../../javax/xml/soap/SOAPElement.html#getEncodingStyle--), [getNamespacePrefixes](../../../javax/xml/soap/SOAPElement.html#getNamespacePrefixes--), [getNamespaceURI](../../../javax/xml/soap/SOAPElement.html#getNamespaceURI-java.lang.String-), [getVisibleNamespacePrefixes](../../../javax/xml/soap/SOAPElement.html#getVisibleNamespacePrefixes--), [removeAttribute](../../../javax/xml/soap/SOAPElement.html#removeAttribute-javax.xml.soap.Name-), [removeAttribute](../../../javax/xml/soap/SOAPElement.html#removeAttribute-javax.xml.namespace.QName-), [removeContents](../../../javax/xml/soap/SOAPElement.html#removeContents--), [removeNamespaceDeclaration](../../../javax/xml/soap/SOAPElement.html#removeNamespaceDeclaration-java.lang.String-), [setElementQName](../../../javax/xml/soap/SOAPElement.html#setElementQName-javax.xml.namespace.QName-), [setEncodingStyle](../../../javax/xml/soap/SOAPElement.html#setEncodingStyle-java.lang.String-)` * ### Methods inherited from interface javax.xml.soap.[Node](../../../javax/xml/soap/Node.html "interface in javax.xml.soap") `[detachNode](../../../javax/xml/soap/Node.html#detachNode--), [getParentElement](../../../javax/xml/soap/Node.html#getParentElement--), [getValue](../../../javax/xml/soap/Node.html#getValue--), [recycleNode](../../../javax/xml/soap/Node.html#recycleNode--), [setParentElement](../../../javax/xml/soap/Node.html#setParentElement-javax.xml.soap.SOAPElement-), [setValue](../../../javax/xml/soap/Node.html#setValue-java.lang.String-)` * ### Methods inherited from interface org.w3c.dom.[Element](../../../org/w3c/dom/Element.html "interface in org.w3c.dom") `[getAttribute](../../../org/w3c/dom/Element.html#getAttribute-java.lang.String-), [getAttributeNode](../../../org/w3c/dom/Element.html#getAttributeNode-java.lang.String-), [getAttributeNodeNS](../../../org/w3c/dom/Element.html#getAttributeNodeNS-java.lang.String-java.lang.String-), [getAttributeNS](../../../org/w3c/dom/Element.html#getAttributeNS-java.lang.String-java.lang.String-), [getElementsByTagName](../../../org/w3c/dom/Element.html#getElementsByTagName-java.lang.String-), [getElementsByTagNameNS](../../../org/w3c/dom/Element.html#getElementsByTagNameNS-java.lang.String-java.lang.String-), [getSchemaTypeInfo](../../../org/w3c/dom/Element.html#getSchemaTypeInfo--), [getTagName](../../../org/w3c/dom/Element.html#getTagName--), [hasAttribute](../../../org/w3c/dom/Element.html#hasAttribute-java.lang.String-), [hasAttributeNS](../../../org/w3c/dom/Element.html#hasAttributeNS-java.lang.String-java.lang.String-), [removeAttribute](../../../org/w3c/dom/Element.html#removeAttribute-java.lang.String-), [removeAttributeNode](../../../org/w3c/dom/Element.html#removeAttributeNode-org.w3c.dom.Attr-), [removeAttributeNS](../../../org/w3c/dom/Element.html#removeAttributeNS-java.lang.String-java.lang.String-), [setAttribute](../../../org/w3c/dom/Element.html#setAttribute-java.lang.String-java.lang.String-), [setAttributeNode](../../../org/w3c/dom/Element.html#setAttributeNode-org.w3c.dom.Attr-), [setAttributeNodeNS](../../../org/w3c/dom/Element.html#setAttributeNodeNS-org.w3c.dom.Attr-), [setAttributeNS](../../../org/w3c/dom/Element.html#setAttributeNS-java.lang.String-java.lang.String-java.lang.String-), [setIdAttribute](../../../org/w3c/dom/Element.html#setIdAttribute-java.lang.String-boolean-), [setIdAttributeNode](../../../org/w3c/dom/Element.html#setIdAttributeNode-org.w3c.dom.Attr-boolean-), [setIdAttributeNS](../../../org/w3c/dom/Element.html#setIdAttributeNS-java.lang.String-java.lang.String-boolean-)` * ### Methods inherited from interface org.w3c.dom.[Node](../../../org/w3c/dom/Node.html "interface in org.w3c.dom") `[appendChild](../../../org/w3c/dom/Node.html#appendChild-org.w3c.dom.Node-), [cloneNode](../../../org/w3c/dom/Node.html#cloneNode-boolean-), [compareDocumentPosition](../../../org/w3c/dom/Node.html#compareDocumentPosition-org.w3c.dom.Node-), [getAttributes](../../../org/w3c/dom/Node.html#getAttributes--), [getBaseURI](../../../org/w3c/dom/Node.html#getBaseURI--), [getChildNodes](../../../org/w3c/dom/Node.html#getChildNodes--), [getFeature](../../../org/w3c/dom/Node.html#getFeature-java.lang.String-java.lang.String-), [getFirstChild](../../../org/w3c/dom/Node.html#getFirstChild--), [getLastChild](../../../org/w3c/dom/Node.html#getLastChild--), [getLocalName](../../../org/w3c/dom/Node.html#getLocalName--), [getNamespaceURI](../../../org/w3c/dom/Node.html#getNamespaceURI--), [getNextSibling](../../../org/w3c/dom/Node.html#getNextSibling--), [getNodeName](../../../org/w3c/dom/Node.html#getNodeName--), [getNodeType](../../../org/w3c/dom/Node.html#getNodeType--), [getNodeValue](../../../org/w3c/dom/Node.html#getNodeValue--), [getOwnerDocument](../../../org/w3c/dom/Node.html#getOwnerDocument--), [getParentNode](../../../org/w3c/dom/Node.html#getParentNode--), [getPrefix](../../../org/w3c/dom/Node.html#getPrefix--), [getPreviousSibling](../../../org/w3c/dom/Node.html#getPreviousSibling--), [getTextContent](../../../org/w3c/dom/Node.html#getTextContent--), [getUserData](../../../org/w3c/dom/Node.html#getUserData-java.lang.String-), [hasAttributes](../../../org/w3c/dom/Node.html#hasAttributes--), [hasChildNodes](../../../org/w3c/dom/Node.html#hasChildNodes--), [insertBefore](../../../org/w3c/dom/Node.html#insertBefore-org.w3c.dom.Node-org.w3c.dom.Node-), [isDefaultNamespace](../../../org/w3c/dom/Node.html#isDefaultNamespace-java.lang.String-), [isEqualNode](../../../org/w3c/dom/Node.html#isEqualNode-org.w3c.dom.Node-), [isSameNode](../../../org/w3c/dom/Node.html#isSameNode-org.w3c.dom.Node-), [isSupported](../../../org/w3c/dom/Node.html#isSupported-java.lang.String-java.lang.String-), [lookupNamespaceURI](../../../org/w3c/dom/Node.html#lookupNamespaceURI-java.lang.String-), [lookupPrefix](../../../org/w3c/dom/Node.html#lookupPrefix-java.lang.String-), [normalize](../../../org/w3c/dom/Node.html#normalize--), [removeChild](../../../org/w3c/dom/Node.html#removeChild-org.w3c.dom.Node-), [replaceChild](../../../org/w3c/dom/Node.html#replaceChild-org.w3c.dom.Node-org.w3c.dom.Node-), [setNodeValue](../../../org/w3c/dom/Node.html#setNodeValue-java.lang.String-), [setPrefix](../../../org/w3c/dom/Node.html#setPrefix-java.lang.String-), [setTextContent](../../../org/w3c/dom/Node.html#setTextContent-java.lang.String-), [setUserData](../../../org/w3c/dom/Node.html#setUserData-java.lang.String-java.lang.Object-org.w3c.dom.UserDataHandler-)`
Method Detail
* #### setActor void setActor([String](../../../java/lang/String.html "class in java.lang") actorURI) Sets the actor associated with this `SOAPHeaderElement` object to the specified actor. The default value of an actor is:`SOAPConstants.URI_SOAP_ACTOR_NEXT` If this `SOAPHeaderElement` supports SOAP 1.2 then this call is equivalent to [setRole(String)](../../../javax/xml/soap/SOAPHeaderElement.html#setRole-java.lang.String-) Parameters: `actorURI` \- a `String` giving the URI of the actor to set Throws: `[IllegalArgumentException](../../../java/lang/IllegalArgumentException.html "class in java.lang")` \- if there is a problem in setting the actor. See Also: [getActor()](../../../javax/xml/soap/SOAPHeaderElement.html#getActor--) * #### setRole void setRole([String](../../../java/lang/String.html "class in java.lang") uri) throws [SOAPException](../../../javax/xml/soap/SOAPException.html "class in javax.xml.soap") Sets the `Role` associated with this `SOAPHeaderElement` object to the specified `Role`. Parameters: `uri` \- - the URI of the `Role` Throws: `[SOAPException](../../../javax/xml/soap/SOAPException.html "class in javax.xml.soap")` \- if there is an error in setting the role `[UnsupportedOperationException](../../../java/lang/UnsupportedOperationException.html "class in java.lang")` \- if this message does not support the SOAP 1.2 concept of Fault Role. Since: SAAJ 1.3 * #### getActor [String](../../../java/lang/String.html "class in java.lang") getActor() Returns the uri of the _actor_ attribute of this`SOAPHeaderElement`. If this `SOAPHeaderElement` supports SOAP 1.2 then this call is equivalent to [getRole()](../../../javax/xml/soap/SOAPHeaderElement.html#getRole--) Returns: a `String` giving the URI of the actor See Also: [setActor(java.lang.String)](../../../javax/xml/soap/SOAPHeaderElement.html#setActor-java.lang.String-) * #### getRole [String](../../../java/lang/String.html "class in java.lang") getRole() Returns the value of the _Role_ attribute of this`SOAPHeaderElement`. Returns: a `String` giving the URI of the `Role` Throws: `[UnsupportedOperationException](../../../java/lang/UnsupportedOperationException.html "class in java.lang")` \- if this message does not support the SOAP 1.2 concept of Fault Role. Since: SAAJ 1.3 * #### setMustUnderstand void setMustUnderstand(boolean mustUnderstand) Sets the mustUnderstand attribute for this `SOAPHeaderElement` object to be either true or false. If the mustUnderstand attribute is on, the actor who receives the`SOAPHeaderElement` must process it correctly. This ensures, for example, that if the `SOAPHeaderElement` object modifies the message, that the message is being modified correctly. Parameters: `mustUnderstand` \- `true` to set the mustUnderstand attribute to true; `false` to set it to false Throws: `[IllegalArgumentException](../../../java/lang/IllegalArgumentException.html "class in java.lang")` \- if there is a problem in setting the mustUnderstand attribute See Also: [getMustUnderstand()](../../../javax/xml/soap/SOAPHeaderElement.html#getMustUnderstand--), [setRelay(boolean)](../../../javax/xml/soap/SOAPHeaderElement.html#setRelay-boolean-) * #### getMustUnderstand boolean getMustUnderstand() Returns the boolean value of the mustUnderstand attribute for this`SOAPHeaderElement`. Returns: `true` if the mustUnderstand attribute of this`SOAPHeaderElement` object is turned on; `false` otherwise * #### setRelay void setRelay(boolean relay) throws [SOAPException](../../../javax/xml/soap/SOAPException.html "class in javax.xml.soap") Sets the _relay_ attribute for this `SOAPHeaderElement` to be either true or false. The SOAP relay attribute is set to true to indicate that the SOAP header block must be relayed by any node that is targeted by the header block but not actually process it. This attribute is ignored on header blocks whose mustUnderstand attribute is set to true or that are targeted at the ultimate reciever (which is the default). The default value of this attribute is `false`. Parameters: `relay` \- the new value of the _relay_ attribute Throws: `[SOAPException](../../../javax/xml/soap/SOAPException.html "class in javax.xml.soap")` \- if there is a problem in setting the relay attribute. `[UnsupportedOperationException](../../../java/lang/UnsupportedOperationException.html "class in java.lang")` \- if this message does not support the SOAP 1.2 concept of Relay attribute. Since: SAAJ 1.3 See Also: [setMustUnderstand(boolean)](../../../javax/xml/soap/SOAPHeaderElement.html#setMustUnderstand-boolean-), [getRelay()](../../../javax/xml/soap/SOAPHeaderElement.html#getRelay--) * #### getRelay boolean getRelay() Returns the boolean value of the _relay_ attribute for this`SOAPHeaderElement` Returns: `true` if the relay attribute is turned on;`false` otherwise Throws: `[UnsupportedOperationException](../../../java/lang/UnsupportedOperationException.html "class in java.lang")` \- if this message does not support the SOAP 1.2 concept of Relay attribute. Since: SAAJ 1.3 See Also: [getMustUnderstand()](../../../javax/xml/soap/SOAPHeaderElement.html#getMustUnderstand--), [setRelay(boolean)](../../../javax/xml/soap/SOAPHeaderElement.html#setRelay-boolean-)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.