Spring Web Services Framework

org.springframework.ws.soap
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:
SoapHeaderElement, SoapEnvelope.getHeader()

Method Summary
 SoapHeaderElement addHeaderElement(QName name)
          Adds a new SoapHeaderElement with the specified qualified name to this header.
 Iterator examineAllHeaderElements()
          Returns an Iterator over all the SoapHeaderElements in this header.
 Iterator examineMustUnderstandHeaderElements(String actorOrRole)
          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.
 Result getResult()
          Returns a Result that represents the concents of the header.
 void removeHeaderElement(QName name)
          Removes the SoapHeaderElement with the specified qualified name from this header.
 
Methods inherited from interface org.springframework.ws.soap.SoapElement
addAttribute, addNamespaceDeclaration, getAllAttributes, getAttributeValue, getName, getSource, removeAttribute
 

Method Detail

getResult

Result getResult()
Returns a Result that represents the concents 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 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:
SoapHeaderElement

examineAllHeaderElements

Iterator 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:
SoapHeaderElement

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.