Package org.springframework.ws.soap
Interface SoapHeader
- All Superinterfaces:
SoapElement
- All Known Subinterfaces:
Soap11Header
,Soap12Header
Represents the
Header
element in a SOAP message. A SOAP header contains SoapHeaderElement
s, which
represent the individual headers.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddHeaderElement
(QName name) Adds a newSoapHeaderElement
with the specified qualified name to this header.Returns anIterator
over all theSoapHeaderElement
s in this header.examineHeaderElements
(QName name) Returns anIterator
over all theSoapHeaderElement
s with the given qualified name in this header.examineMustUnderstandHeaderElements
(String actorOrRole) Returns anIterator
over all theSoapHeaderElement
s that have the specified actor or role and that have aMustUnderstand
attribute whose value is equivalent totrue
.Returns aResult
that represents the contents of the header.void
removeHeaderElement
(QName name) Removes theSoapHeaderElement
with the specified qualified name from this header.Methods inherited from interface org.springframework.ws.soap.SoapElement
addAttribute, addNamespaceDeclaration, getAllAttributes, getAttributeValue, getName, getSource, removeAttribute
-
Method Details
-
getResult
Result getResult()Returns aResult
that represents the contents of the header.The result can be used for marshalling.
- Returns:
- the
Result
of this element
-
addHeaderElement
Adds a newSoapHeaderElement
with the specified qualified name to this header.- Parameters:
name
- the qualified name of the new header element- Returns:
- the created
SoapHeaderElement
- Throws:
SoapHeaderException
- if the header cannot be created
-
removeHeaderElement
Removes theSoapHeaderElement
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.
- Parameters:
name
- the qualified name of the header element to be removed- Throws:
SoapHeaderException
- if the header cannot be removed
-
examineMustUnderstandHeaderElements
Iterator<SoapHeaderElement> examineMustUnderstandHeaderElements(String actorOrRole) throws SoapHeaderException Returns anIterator
over all theSoapHeaderElement
s that have the specified actor or role and that have aMustUnderstand
attribute whose value is equivalent totrue
.- Parameters:
actorOrRole
- the actor (SOAP 1.1) or role (SOAP 1.2) for which to search- Returns:
- an iterator over all the header elements that contain the specified actor/role and are marked as
MustUnderstand
- Throws:
SoapHeaderException
- if the headers cannot be returned- See Also:
-
examineAllHeaderElements
Returns anIterator
over all theSoapHeaderElement
s in this header.- Returns:
- an iterator over all the header elements
- Throws:
SoapHeaderException
- if the header cannot be returned- See Also:
-
examineHeaderElements
Returns anIterator
over all theSoapHeaderElement
s with the given qualified name in this header.- Parameters:
name
- the qualified name for which to search- Returns:
- an iterator over all the header elements
- Throws:
SoapHeaderException
- if the header cannot be returned- Since:
- 2.0.3
- See Also:
-