Package org.springframework.ws.soap
Interface SoapHeaderElement
- All Superinterfaces:
SoapElement
Represents the contents of an individual SOAP header in the a SOAP message. All
SoapHeaderElements 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.booleanIndicates whether themustUnderstandattribute for this header element is set.Returns aResultthat allows for writing to the contents of the header element.getText()Returns the text content of this header element, if any.voidsetActorOrRole(String actorOrRole) Sets the actor or role for this header element.voidsetMustUnderstand(boolean mustUnderstand) Sets themustUnderstandattribute for this header element.voidSets 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 theactorattribute; in SOAP 1.2, theroleattribute.- 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 anactorattribute being set; in SOAP 1.2, aactorOrRoleattribute.- Parameters:
actorOrRole- the actorOrRole value- Throws:
SoapHeaderException
-
getMustUnderstand
Indicates whether themustUnderstandattribute for this header element is set.- Returns:
trueif themustUnderstandattribute is set;falseotherwise- Throws:
SoapHeaderException
-
setMustUnderstand
Sets themustUnderstandattribute for this header element. If the attribute is on, the role who receives the header must process it.- Parameters:
mustUnderstand-trueto set themustUnderstandattribute on;falseto turn it off- Throws:
SoapHeaderException
-
getResult
Returns aResultthat 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
-