* false specifies they should not be returned
* @return the list of matching header blocks
*/
public static List<XMLObject> getSOAP11HeaderBlock(Envelope envelope, QName headerName, Set<String> targetNodes,
boolean isFinalDestination) {
Header envelopeHeader = envelope.getHeader();
if (envelopeHeader == null) {
return Collections.emptyList();
}
ArrayList<XMLObject> headers = new ArrayList<XMLObject>();
for (XMLObject header : envelopeHeader.getUnknownXMLObjects(headerName)) {
if (isSOAP11HeaderTargetedToNode(header, targetNodes, isFinalDestination)) {
headers.add(header);
}
}