Package org.apache.axiom.soap
Interface SOAPHeaderBlock
-
- All Superinterfaces:
OMContainer,OMElement,OMInformationItem,OMNamedInformationItem,OMNode,OMSerializable,OMSourcedElement
public interface SOAPHeaderBlock extends OMSourcedElement
An object representing the contents in the SOAP header part of the SOAP envelope. The immediate children of a
SOAPHeaderobject can be represented only asSOAPHeaderBlockobjects.B
SOAPHeaderBlockobject can have otherOMElementobjects as its children.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMUST_UNDERSTAND_PROPERTYstatic StringRELAY_PROPERTYstatic StringROLE_PROPERTYA SOAPHeaderBlock may be represented as an unexpanded OMSourcedElement.-
Fields inherited from interface org.apache.axiom.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleangetMustUnderstand()Returns the boolean value of themustUnderstandattribute for this header block.booleangetRelay()Returns the relay status associated with thisSOAPHeaderBlockobject.StringgetRole()Returns the uri of the actor associated with thisSOAPHeaderBlockobject.SOAPVersiongetVersion()What SOAP version is this HeaderBlock?booleanisProcessed()voidsetMustUnderstand(boolean mustUnderstand)Sets the mustUnderstand attribute for thisSOAPHeaderBlockobject to be on or off.voidsetProcessed()We need to know whether all the mustUnderstand headers have been processed by the node.voidsetRelay(boolean relay)Sets the relay attribute for this SOAPHeaderBlock to be either true or false.voidsetRole(String roleURI)Sets the actor associated with thisSOAPHeaderBlockobject to the specified actor.-
Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getSAXResult, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, getXOPEncodedStreamReader, removeChildren, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
-
Methods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getDescendants, getFirstElement, getLineNumber, getNamespaceContext, getNamespacesInScope, getText, getTextAsQName, getTextAsStream, removeAttribute, resolveQName, setLineNumber, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume, undeclarePrefix, writeTextTo
-
Methods inherited from interface org.apache.axiom.om.OMInformationItem
clone, getOMFactory
-
Methods inherited from interface org.apache.axiom.om.OMNamedInformationItem
getLocalName, getNamespace, getNamespaceURI, getPrefix, getQName, hasName, setLocalName, setNamespace
-
Methods inherited from interface org.apache.axiom.om.OMNode
buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore
-
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, isComplete, serialize, serialize, serializeAndConsume
-
Methods inherited from interface org.apache.axiom.om.OMSourcedElement
getDataSource, getObject, isExpanded, setDataSource
-
-
-
-
Field Detail
-
ROLE_PROPERTY
static final String ROLE_PROPERTY
A SOAPHeaderBlock may be represented as an unexpanded OMSourcedElement. In such cases, the underlying OMDataSource may have a property that contains the value of the ROLE/ACTOR, RELAY or MUST_UNDERSTAND setting.- See Also:
- Constant Field Values
-
RELAY_PROPERTY
static final String RELAY_PROPERTY
- See Also:
- Constant Field Values
-
MUST_UNDERSTAND_PROPERTY
static final String MUST_UNDERSTAND_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setRole
void setRole(String roleURI)
Sets the actor associated with thisSOAPHeaderBlockobject to the specified actor.- Parameters:
roleURI- aStringgiving the URI of the actor to set- Throws:
IllegalArgumentException- if there is a problem in setting the actor.- See Also:
getRole()
-
getRole
String getRole()
Returns the uri of the actor associated with thisSOAPHeaderBlockobject.- Returns:
- a
Stringgiving the URI of the actor - See Also:
setRole(java.lang.String)
-
setMustUnderstand
void setMustUnderstand(boolean mustUnderstand)
Sets the mustUnderstand attribute for thisSOAPHeaderBlockobject to be on or off.If the mustUnderstand attribute is on, the actor who receives the
SOAPHeaderBlockmust process it correctly. This ensures, for example, that if theSOAPHeaderBlockobject modifies the message, that the message is being modified correctly.- Parameters:
mustUnderstand-trueto set the mustUnderstand attribute on;falseto turn if off- Throws:
IllegalArgumentException- if there is a problem in setting the actor.- See Also:
getMustUnderstand()
-
getMustUnderstand
boolean getMustUnderstand() throws SOAPProcessingExceptionReturns the boolean value of themustUnderstandattribute for this header block.- Returns:
trueif amustUnderstandattribute is present and its value is equivalent to true,falseif themustUnderstandis not present or its value is equivalent to false- Throws:
SOAPProcessingException- if themustUnderstandattribute is present, but has an invalid value
-
isProcessed
boolean isProcessed()
-
setProcessed
void setProcessed()
We need to know whether all the mustUnderstand headers have been processed by the node. This will done by a specific validation handler at the end of the execution chain. For this all the handlers who process a particular header block must explicitly say that he processesd the header by calling setProcessed()
-
setRelay
void setRelay(boolean relay)
Sets the relay attribute for this SOAPHeaderBlock to be either true or false. The SOAP relay attribute is set to true to indicate that the SOAP header block must be relayed by any node that is targeted by the header block but not actually process it.- Parameters:
relay- abooleangiving the value to be set
-
getRelay
boolean getRelay()
Returns the relay status associated with thisSOAPHeaderBlockobject.- Returns:
- a
booleangiving the relay status
-
getVersion
SOAPVersion getVersion()
What SOAP version is this HeaderBlock?- Returns:
- a SOAPVersion, one of the two singletons.
-
-