Interface SoapHeader

All Superinterfaces:
SoapElement
All Known Subinterfaces:
Soap11Header, Soap12Header

public interface SoapHeader extends SoapElement
Represents the Header element in a SOAP message. A SOAP header contains SoapHeaderElements, which represent the individual headers.
Since:
1.0.0
Author:
Arjen Poutsma
See Also:
  • Method Details

    • getResult

      Result getResult()
      Returns a Result that represents the contents of the header.

      The result can be used for marshalling.

      Returns:
      the Result of this element
    • addHeaderElement

      SoapHeaderElement addHeaderElement(QName name) throws SoapHeaderException
      Adds a new SoapHeaderElement with the specified qualified name to this header.
      Parameters:
      name - the qualified name of the new header element
      Returns:
      the created SoapHeaderElement
      Throws:
      SoapHeaderException - if the header cannot be created
    • removeHeaderElement

      void removeHeaderElement(QName name) throws SoapHeaderException
      Removes the SoapHeaderElement with the specified qualified name from this header.

      This method will only remove the first child element with the specified name. If no element is found with the specified name, this method has no effect.

      Parameters:
      name - the qualified name of the header element to be removed
      Throws:
      SoapHeaderException - if the header cannot be removed
    • examineMustUnderstandHeaderElements

      Iterator<SoapHeaderElement> examineMustUnderstandHeaderElements(String actorOrRole) throws SoapHeaderException
      Returns an Iterator over all the SoapHeaderElements that have the specified actor or role and that have a MustUnderstand attribute whose value is equivalent to true.
      Parameters:
      actorOrRole - the actor (SOAP 1.1) or role (SOAP 1.2) for which to search
      Returns:
      an iterator over all the header elements that contain the specified actor/role and are marked as MustUnderstand
      Throws:
      SoapHeaderException - if the headers cannot be returned
      See Also:
    • examineAllHeaderElements

      Iterator<SoapHeaderElement> examineAllHeaderElements() throws SoapHeaderException
      Returns an Iterator over all the SoapHeaderElements in this header.
      Returns:
      an iterator over all the header elements
      Throws:
      SoapHeaderException - if the header cannot be returned
      See Also:
    • examineHeaderElements

      Iterator<SoapHeaderElement> examineHeaderElements(QName name) throws SoapHeaderException
      Returns an Iterator over all the SoapHeaderElements with the given qualified name in this header.
      Parameters:
      name - the qualified name for which to search
      Returns:
      an iterator over all the header elements
      Throws:
      SoapHeaderException - if the header cannot be returned
      Since:
      2.0.3
      See Also: