Package org.springframework.ws.soap
Interface SoapHeaderElement
- All Superinterfaces:
SoapElement
Represents the contents of an individual SOAP header in the a SOAP message. All
SoapHeaderElement
s are
contained in a SoapHeader
.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the actor or role for this header element.boolean
Indicates whether themustUnderstand
attribute for this header element is set.Returns aResult
that allows for writing to the contents of the header element.getText()
Returns the text content of this header element, if any.void
setActorOrRole
(String actorOrRole) Sets the actor or role for this header element.void
setMustUnderstand
(boolean mustUnderstand) Sets themustUnderstand
attribute for this header element.void
Sets the text content of this header element.Methods inherited from interface org.springframework.ws.soap.SoapElement
addAttribute, addNamespaceDeclaration, getAllAttributes, getAttributeValue, getName, getSource, removeAttribute
-
Method Details
-
getActorOrRole
Returns the actor or role for this header element. In a SOAP 1.1 compliant message, this will read theactor
attribute; in SOAP 1.2, therole
attribute.- Returns:
- the role of the header
- Throws:
SoapHeaderException
-
setActorOrRole
Sets the actor or role for this header element. In a SOAP 1.1 compliant message, this will result in anactor
attribute being set; in SOAP 1.2, aactorOrRole
attribute.- Parameters:
actorOrRole
- the actorOrRole value- Throws:
SoapHeaderException
-
getMustUnderstand
Indicates whether themustUnderstand
attribute for this header element is set.- Returns:
true
if themustUnderstand
attribute is set;false
otherwise- Throws:
SoapHeaderException
-
setMustUnderstand
Sets themustUnderstand
attribute for this header element. If the attribute is on, the role who receives the header must process it.- Parameters:
mustUnderstand
-true
to set themustUnderstand
attribute on;false
to turn it off- Throws:
SoapHeaderException
-
getResult
Returns aResult
that allows for writing to the contents of the header element.- Throws:
SoapHeaderException
-
getText
String getText()Returns the text content of this header element, if any.- Returns:
- the text content of this header element
-
setText
Sets the text content of this header element.- Parameters:
content
- the new text content of this header element
-