super.checkMandatoryHeaders(packet, foundAction, foundTo, foundReplyTo,
foundFaultTo, foundMessageId, foundRelatesTo);
// if no wsa:To header is found
if (!foundTo)
throw new MissingAddressingHeaderException(addressingVersion.toTag,packet);
//we can find Req/Response or Oneway only with WSDLModel
if (wsdlPort != null) {
WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
// if two-way, must contain wsa:ReplyTo
// Unlike W3C version, we cannot assume default value as anonymous if not present.
// For protocol messages, don't check as they do not have any corresponding wsdl operations
if (wbo != null && !wbo.getOperation().isOneWay() && !foundReplyTo) {
throw new MissingAddressingHeaderException(addressingVersion.replyToTag,packet);
}
}
if (!validation.equals(MemberSubmissionAddressing.Validation.LAX)) {
// wsa:MessageId is required if wsa:ReplyTo is present.
if ((foundReplyTo || foundFaultTo) && !foundMessageId)
throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet);
}
}