for (String name : names) {
boolean found = false;
Iterator headerElements = header.examineAllHeaderElements();
while (headerElements.hasNext()) {
SOAPHeaderElement headerElement = (SOAPHeaderElement)headerElements.next();
Name headerName = headerElement.getElementName();
String localName = headerName.getLocalName();
if (headerName.getURI().equals(RMUtils.getRMConstants().getNamespaceURI())
&& localName.equals(name)) {
found = true;
break;
} else if (headerName.getURI().equals(
org.objectweb.celtix.bus.ws.addressing.Names.WSA_NAMESPACE_NAME)
&& localName.equals(name)) {
found = true;
break;
}
}
assertTrue("Could not find header element " + name, found);
}
// no other headers should be present
Iterator headerElements = header.examineAllHeaderElements();
while (headerElements.hasNext()) {
SOAPHeaderElement headerElement = (SOAPHeaderElement)headerElements.next();
Name headerName = headerElement.getElementName();
String localName = headerName.getLocalName();
assertTrue(RMUtils.getRMConstants().getNamespaceURI().equals(headerName.getURI())
|| org.objectweb.celtix.bus.ws.addressing.Names.WSA_NAMESPACE_NAME
.equals(headerName.getURI()));
boolean found = false;