public class SOAPHeader extends MessageElement implements SOAPHeader
MessageElement.QNameAttr
_isRoot, context, encodingStyle, endEventIndex, fixupDeserializer, href, id, message, namespaces, qNameAttrs, recorder, startContentsIndex, startEventIndex, typeQName
_isDirty, attributes, children, document, name, namespaceURI, parent, prefix, textRep
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 and Description |
---|
SOAPHeader(String namespace,
String localPart,
String prefix,
Attributes attributes,
DeserializationContext context,
SOAPConstants soapConsts) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(MessageElement element)
Note that this method will log a error and no-op if there is
a value (set using setObjectValue) in the MessageElement.
|
SOAPElement |
addChildElement(Name name)
add the child element
|
SOAPElement |
addChildElement(SOAPElement element)
The added child must be an instance of MessageElement rather than
an abitrary SOAPElement otherwise a (wrapped) ClassCastException
will be thrown.
|
SOAPElement |
addChildElement(String localName)
add a child element in the message element's own namespace
|
SOAPElement |
addChildElement(String localName,
String prefix)
add a child element
|
SOAPElement |
addChildElement(String localName,
String prefix,
String uri)
add a child element
|
SOAPHeaderElement |
addHeaderElement(Name name)
Creates a new
SOAPHeaderElement object
initialized with the specified name and adds it to this
SOAPHeader object. |
Node |
appendChild(Node newChild)
Adds the node
newChild to the end of the list of children
of this node. |
Iterator |
examineAllHeaderElements()
Returns an
Iterator over all the
SOAPHeaderElement objects in this SOAPHeader
object. |
Iterator |
examineHeaderElements(String actor)
Returns a list of all the
SOAPHeaderElement
objects in this SOAPHeader object that have the
the specified actor. |
Iterator |
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 |
extractAllHeaderElements()
Returns an
Iterator over all the
SOAPHeaderElement objects in this SOAPHeader
object and detaches them from this SOAPHeader object. |
Iterator |
extractHeaderElements(String actor)
Returns a list of all the
SOAPHeaderElement
objects in this SOAPHeader object that have
the the specified actor and detaches them from this
SOAPHeader object. |
protected void |
outputImpl(SerializationContext context)
override point -output to a serialization context.
|
void |
setParentElement(SOAPElement parent)
Sets the parent of this
Node object to the given
SOAPElement object. |
addAttribute, addAttribute, addAttribute, addAttribute, addMapping, addNamespaceDeclaration, addTextNode, childDeepCloned, cloneNode, cloning, detachAllChildren, equals, findElement, getAllAttributes, getAsDocument, getAsDOM, getAsString, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributesEx, getAttributeValue, getAttributeValue, getChildElement, getChildElements, getChildElements, getChildElements, getChildren, getCompleteAttributes, getDeserializationContext, getElementName, getElementsByTagName, getElementsByTagNameNS, getElementsNS, getEncodingStyle, getEnvelope, getFixupDeserializer, getHref, getID, getLength, getName, getNamespacePrefixes, getNamespaceURI, getObjectValue, getObjectValue, getOwnerDocument, getPrefix, getQName, getRealElement, getRecorder, getTagName, getType, getValue, getValueAsType, getValueAsType, getValueDOM, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, isRoot, item, output, publishContents, publishToHandler, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAllAttributes, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setContentsIndex, setEncodingStyle, setEndIndex, setEnvelope, setFixupDeserializer, setName, setNamespaceURI, setNSMappings, setObjectValue, setQName, setRecorder, setType, setValue, toString
convertAttrSAXtoDOM, detachNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDirty, isSupported, makeAttributesEditable, normalize, recycleNode, removeChild, replaceChild, reset, setDirty, setDirty, setNodeValue, setOwnerDocument, setParent, setPrefix
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttribute, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, 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
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
public SOAPHeader(String namespace, String localPart, String prefix, Attributes attributes, DeserializationContext context, SOAPConstants soapConsts) throws AxisFault
AxisFault
public void setParentElement(SOAPElement parent) throws SOAPException
NodeImpl
Node
object to the given
SOAPElement
object.setParentElement
in class NodeImpl
parent
- 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 elementgetParentElement()
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 occurspublic Iterator examineHeaderElements(String actor)
SOAPHeader
SOAPHeaderElement
objects in this SOAPHeader
object that have the
the specified actor. An actor is a global attribute that
indicates the intermediate parties to whom the message should
be sent. An actor receives the message and then sends it 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, the message is
sent to its ultimate destination.examineHeaderElements
in interface SOAPHeader
actor
- a String
giving the
URI of the actor for which to searchIterator
object over all the
SOAPHeaderElement
objects that contain the
specified actorextractHeaderElements(java.lang.String)
public Iterator extractHeaderElements(String actor)
SOAPHeader
SOAPHeaderElement
objects in this SOAPHeader
object that have
the the specified actor and detaches them from this
SOAPHeader
object.
This method allows an actor 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
actor.
extractHeaderElements
in interface SOAPHeader
actor
- a String
giving the
URI of the actor for which to searchIterator
object over all the
SOAPHeaderElement
objects that contain the
specified actorexamineHeaderElements(java.lang.String)
public Iterator 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
.examineMustUnderstandHeaderElements
in interface SOAPHeader
actor
- a String
giving the URI of the actor for which
to searchIterator
object over all the
SOAPHeaderElement
objects that contain the
specified actor and are marked as MustUnderstandpublic Iterator 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
public Iterator 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
protected void outputImpl(SerializationContext context) throws Exception
MessageElement
outputImpl
in class MessageElement
context
- destination.Exception
- if something went wrong.public void addChild(MessageElement element) throws SOAPException
MessageElement
addChild
in class MessageElement
SOAPException
public SOAPElement addChildElement(SOAPElement element) throws SOAPException
MessageElement
addChildElement
in interface SOAPElement
addChildElement
in class MessageElement
element
- the SOAPElement
to be added as a
new childSOAPException
- if there was an error in adding this
element as a childSOAPElement.addChildElement(javax.xml.soap.SOAPElement)
public SOAPElement addChildElement(Name name) throws SOAPException
MessageElement
addChildElement
in interface SOAPElement
addChildElement
in class MessageElement
name
- uri, prefix and local name of the element to addSOAPException
- if there is an error in creating the
SOAPElement
objectSOAPElement.addChildElement(javax.xml.soap.Name)
public SOAPElement addChildElement(String localName) throws SOAPException
MessageElement
addChildElement
in interface SOAPElement
addChildElement
in class MessageElement
localName
- a String
giving the local name for
the elementSOAPException
- if there is an error in creating the
SOAPElement
objectSOAPElement.addChildElement(String)
public SOAPElement addChildElement(String localName, String prefix) throws SOAPException
MessageElement
addChildElement
in interface SOAPElement
addChildElement
in class MessageElement
localName
- a String
giving the local name for
the new elementprefix
- a String
giving the namespace prefix for
the new elementSOAPException
- if there is an error in creating the
SOAPElement
objectSOAPElement.addChildElement(String, String)
public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
MessageElement
addChildElement
in interface SOAPElement
addChildElement
in class MessageElement
localName
- a String
giving the local name for
the new elementprefix
- a String
giving the namespace prefix for
the new elementuri
- a String
giving the URI of the namespace
to which the new element belongsSOAPException
- if there is an error in creating the
SOAPElement
objectSOAPElement.addChildElement(String, String, String)
public Node appendChild(Node newChild) throws DOMException
NodeImpl
newChild
to the end of the list of children
of this node. If the newChild
is already in the tree, it
is first removed.appendChild
in interface Node
appendChild
in class NodeImpl
newChild
- The node to add.If it is a
DocumentFragment
object, the entire contents of the
document fragment are moved into the child list of this nodeDOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild
node, or if
the node to append is one of this node's ancestors or this node
itself.
newChild
was created
from a different document than the one that created this node.
Copyright © The Apache Software Foundation. All Rights Reserved.