public interface SoapHeader extends SoapElement
Header element in a SOAP message. A SOAP header contains SoapHeaderElements,
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 SoapHeaderElements in this header. |
Iterator<SoapHeaderElement> |
examineHeaderElements(QName name)
Returns an
Iterator over all the SoapHeaderElements with the given qualified name in this header. |
Iterator<SoapHeaderElement> |
examineMustUnderstandHeaderElements(String actorOrRole)
Returns an
Iterator over all the SoapHeaderElements 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, removeAttributeResult 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 elementSoapHeaderElementSoapHeaderException - 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 SoapHeaderElements 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 searchMustUnderstandSoapHeaderException - if the headers cannot be returnedSoapHeaderElementIterator<SoapHeaderElement> examineAllHeaderElements() throws SoapHeaderException
Iterator over all the SoapHeaderElements in this header.SoapHeaderException - if the header cannot be returnedSoapHeaderElementIterator<SoapHeaderElement> examineHeaderElements(QName name) throws SoapHeaderException
Iterator over all the SoapHeaderElements with the given qualified name in this header.name - the qualified name for which to searchSoapHeaderException - if the header cannot be returnedSoapHeaderElement