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 SoapHeaderElements, which
represent the individual headers.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddHeaderElement(QName name) Adds a newSoapHeaderElementwith the specified qualified name to this header.Returns anIteratorover all theSoapHeaderElements in this header.examineHeaderElements(QName name) Returns anIteratorover all theSoapHeaderElements with the given qualified name in this header.examineMustUnderstandHeaderElements(String actorOrRole) Returns anIteratorover all theSoapHeaderElements that have the specified actor or role and that have aMustUnderstandattribute whose value is equivalent totrue.Returns aResultthat represents the contents of the header.voidremoveHeaderElement(QName name) Removes theSoapHeaderElementwith 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 aResultthat represents the contents of the header.The result can be used for marshalling.
- Returns:
- the
Resultof this element
-
addHeaderElement
Adds a newSoapHeaderElementwith 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 theSoapHeaderElementwith 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 anIteratorover all theSoapHeaderElements that have the specified actor or role and that have aMustUnderstandattribute 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 anIteratorover all theSoapHeaderElements in this header.- Returns:
- an iterator over all the header elements
- Throws:
SoapHeaderException- if the header cannot be returned- See Also:
-
examineHeaderElements
Returns anIteratorover all theSoapHeaderElements 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:
-