public interface SoapHeader extends SoapElement
Header
element in a SOAP message. A SOAP header contains SoapHeaderElement
s,
which represent the individual headers.SoapHeaderElement
,
SoapEnvelope.getHeader()
Modifier and Type | Method and Description |
---|---|
SoapHeaderElement |
addHeaderElement(QName name)
Adds a new
SoapHeaderElement with the specified qualified name to this header. |
Iterator<SoapHeaderElement> |
examineAllHeaderElements()
Returns an
Iterator over all the SoapHeaderElement s in this header. |
Iterator<SoapHeaderElement> |
examineHeaderElements(QName name)
Returns an
Iterator over all the SoapHeaderElement s with the given qualified name in this header. |
Iterator<SoapHeaderElement> |
examineMustUnderstandHeaderElements(String actorOrRole)
Returns an
Iterator over all the SoapHeaderElement s that have the specified actor or
role and that have a MustUnderstand attribute whose value is equivalent to true . |
Result |
getResult()
Returns a
Result that represents the contents of the header. |
void |
removeHeaderElement(QName name)
Removes the
SoapHeaderElement with the specified qualified name from this header. |
addAttribute, addNamespaceDeclaration, getAllAttributes, getAttributeValue, getName, getSource, removeAttribute
Result getResult()
Result
that represents the contents of the header.
The result can be used for marshalling.
Result
of this elementSoapHeaderElement addHeaderElement(QName name) throws SoapHeaderException
SoapHeaderElement
with the specified qualified name to this header.name
- the qualified name of the new header elementSoapHeaderElement
SoapHeaderException
- if the header cannot be createdvoid removeHeaderElement(QName name) throws SoapHeaderException
SoapHeaderElement
with the specified qualified name from this header.
This method will only remove the first child element with the specified name. If no element is found with the specified name, this method has no effect.
name
- the qualified name of the header element to be removedSoapHeaderException
- if the header cannot be removedIterator<SoapHeaderElement> examineMustUnderstandHeaderElements(String actorOrRole) throws SoapHeaderException
Iterator
over all the SoapHeaderElement
s that have the specified actor or
role and that have a MustUnderstand
attribute whose value is equivalent to true
.actorOrRole
- the actor (SOAP 1.1) or role (SOAP 1.2) for which to searchMustUnderstand
SoapHeaderException
- if the headers cannot be returnedSoapHeaderElement
Iterator<SoapHeaderElement> examineAllHeaderElements() throws SoapHeaderException
Iterator
over all the SoapHeaderElement
s in this header.SoapHeaderException
- if the header cannot be returnedSoapHeaderElement
Iterator<SoapHeaderElement> examineHeaderElements(QName name) throws SoapHeaderException
Iterator
over all the SoapHeaderElement
s with the given qualified name in this header.name
- the qualified name for which to searchSoapHeaderException
- if the header cannot be returnedSoapHeaderElement