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 SOAPHeader object can be represented only as SOAPHeaderBlock objects.

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

  • Field Details

    • 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:
    • RELAY_PROPERTY

      static final String RELAY_PROPERTY
      See Also:
    • MUST_UNDERSTAND_PROPERTY

      static final String MUST_UNDERSTAND_PROPERTY
      See Also:
  • Method Details

    • setRole

      void setRole(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:
      IllegalArgumentException - if there is a problem in setting the actor.
      See Also:
    • getRole

      String getRole()
      Returns the uri of the actor associated with this SOAPHeaderBlock object.
      Returns:
      a String giving the URI of the actor
      See Also:
    • setMustUnderstand

      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:
      IllegalArgumentException - if there is a problem in setting the actor.
      See Also:
    • getMustUnderstand

      boolean getMustUnderstand() throws SOAPProcessingException
      Returns the boolean value of the mustUnderstand attribute for this header block.
      Returns:
      true if a mustUnderstand attribute is present and its value is equivalent to true, false if the mustUnderstand is not present or its value is equivalent to false
      Throws:
      SOAPProcessingException - if the mustUnderstand attribute 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 - a boolean giving the value to be set
    • getRelay

      boolean getRelay()
      Returns the relay status associated with this SOAPHeaderBlock object.
      Returns:
      a boolean giving the relay status
    • getVersion

      SOAPVersion getVersion()
      What SOAP version is this HeaderBlock?
      Returns:
      a SOAPVersion, one of the two singletons.