boolean foundMessageId = false;
boolean foundRelatesTo = false;
QName duplicateHeader = null;
while (hIter.hasNext()) {
Header h = hIter.next();
// check if the Header is in current role
if (!isInCurrentRole(h, binding)) {
continue;
}
String local = h.getLocalPart();
if (local.equals(addressingVersion.fromTag.getLocalPart())) {
if (foundFrom) {
duplicateHeader = addressingVersion.fromTag;
break;
}
foundFrom = true;
} else if (local.equals(addressingVersion.toTag.getLocalPart())) {
if (foundTo) {
duplicateHeader = addressingVersion.toTag;
break;
}
foundTo = true;
} else if (local.equals(addressingVersion.replyToTag.getLocalPart())) {
if (foundReplyTo) {
duplicateHeader = addressingVersion.replyToTag;
break;
}
foundReplyTo = true;
try { // verify that the header is in a good shape
h.readAsEPR(addressingVersion);
} catch (XMLStreamException e) {
throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
}
} else if (local.equals(addressingVersion.faultToTag.getLocalPart())) {
if (foundFaultTo) {
duplicateHeader = addressingVersion.faultToTag;
break;
}
foundFaultTo = true;
try { // verify that the header is in a good shape
h.readAsEPR(addressingVersion);
} catch (XMLStreamException e) {
throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e);
}
} else if (local.equals(addressingVersion.actionTag.getLocalPart())) {
if (foundAction) {