org.apache.axiom.soap
Interface SOAPHeaderBlock

All Superinterfaces:
OMContainer, OMElement, OMNode
All Known Implementing Classes:
SOAPHeaderBlockImpl, SOAPHeaderBlockImpl

public interface SOAPHeaderBlock
extends OMElement

An object representing the contents in the SOAP header part of the SOAP envelope. The immediate children of a SOAPHeader object can be represented only as SOAPHeaderBlock objects.

B SOAPHeaderBlock object can have other OMElement objects as its children.


Field Summary
 
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
 boolean getMustUnderstand()
          Returns whether the mustUnderstand attribute for this SOAPHeaderBlock object is turned on.
 java.lang.String getRole()
          Returns the uri of the actor associated with this SOAPHeaderBlock object.
 boolean isProcessed()
           
 void setMustUnderstand(boolean mustUnderstand)
          Sets the mustUnderstand attribute for this SOAPHeaderBlock object to be on or off.
 void setMustUnderstand(java.lang.String mustUnderstand)
           
 void setProcessed()
          We need to know whether all the mustUnderstand headers have been processed by the node.
 void setRole(java.lang.String roleURI)
          Sets the actor associated with this SOAPHeaderBlock object to the specified actor.
 
Methods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getBuilder, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getText, getTextAsQName, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeAttribute, resolveQName, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume
 
Methods inherited from interface org.apache.axiom.om.OMNode
build, detach, discard, getNextOMSibling, getOMFactory, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, buildNext, getChildren, getChildrenWithName, getFirstChildWithName, getFirstOMChild, isComplete
 

Method Detail

setRole

public void setRole(java.lang.String roleURI)
Sets the actor associated with this SOAPHeaderBlock object to the specified actor.

Parameters:
roleURI - a String giving the URI of the actor to set
Throws:
java.lang.IllegalArgumentException - if there is a problem in setting the actor.
See Also:
getRole()

getRole

public java.lang.String getRole()
Returns the uri of the actor associated with this SOAPHeaderBlock object.

Returns:
a String giving the URI of the actor
See Also:
setRole(java.lang.String)

setMustUnderstand

public void setMustUnderstand(boolean mustUnderstand)
Sets the mustUnderstand attribute for this SOAPHeaderBlock object to be on or off.

If the mustUnderstand attribute is on, the actor who receives the SOAPHeaderBlock must process it correctly. This ensures, for example, that if the SOAPHeaderBlock object modifies the message, that the message is being modified correctly.

Parameters:
mustUnderstand - true to set the mustUnderstand attribute on; false to turn if off
Throws:
java.lang.IllegalArgumentException - if there is a problem in setting the actor.
See Also:
getMustUnderstand()

setMustUnderstand

public void setMustUnderstand(java.lang.String mustUnderstand)
                       throws SOAPProcessingException
Throws:
SOAPProcessingException

getMustUnderstand

public boolean getMustUnderstand()
                          throws SOAPProcessingException
Returns whether the mustUnderstand attribute for this SOAPHeaderBlock object is turned on.

Returns:
true if the mustUnderstand attribute of this SOAPHeaderBlock object is turned on; false otherwise
Throws:
SOAPProcessingException

isProcessed

public boolean isProcessed()

setProcessed

public 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()