@Override protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo, boolean foundFaultTo, boolean foundMessageID, boolean foundRelatesTo) { super.checkMandatoryHeaders(packet,foundAction,foundTo,foundReplyTo,foundFaultTo,foundMessageID,foundRelatesTo); // if no wsa:To header is found if (!foundTo) { throw new MissingAddressingHeaderException(addressingVersion.toTag,packet); } if (!validation.equals(MemberSubmissionAddressing.Validation.LAX)) { // if it is not one-way, response must contain wsa:RelatesTo // RelatesTo required as per // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) { String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion); // Don't check for AddressingFaults as // Faults for requests with duplicate MessageId will have no wsa:RelatesTo if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) { throw new MissingAddressingHeaderException(addressingVersion.relatesToTag,packet); } } } } }
@Override protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo, boolean foundFaultTo, boolean foundMessageId, boolean foundRelatesTo) { 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); } } }
@Override protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo, boolean foundFaultTo, boolean foundMessageId, boolean foundRelatesTo) { 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); } } }
@Override protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo, boolean foundFaultTo, boolean foundMessageID, boolean foundRelatesTo) { super.checkMandatoryHeaders(packet,foundAction,foundTo,foundReplyTo,foundFaultTo,foundMessageID,foundRelatesTo); // if no wsa:To header is found if (!foundTo) { throw new MissingAddressingHeaderException(addressingVersion.toTag,packet); } if (!validation.equals(MemberSubmissionAddressing.Validation.LAX)) { // if it is not one-way, response must contain wsa:RelatesTo // RelatesTo required as per // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) { String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion); // Don't check for AddressingFaults as // Faults for requests with duplicate MessageId will have no wsa:RelatesTo if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) { throw new MissingAddressingHeaderException(addressingVersion.relatesToTag,packet); } } } } }
@Override protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo, boolean foundFaultTo, boolean foundMessageId, boolean foundRelatesTo) { 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); } } }
@Override protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo, boolean foundFaultTo, boolean foundMessageID, boolean foundRelatesTo) { super.checkMandatoryHeaders(packet,foundAction,foundTo,foundReplyTo,foundFaultTo,foundMessageID,foundRelatesTo); // if no wsa:To header is found if (!foundTo) { throw new MissingAddressingHeaderException(addressingVersion.toTag,packet); } if (!validation.equals(MemberSubmissionAddressing.Validation.LAX)) { // if it is not one-way, response must contain wsa:RelatesTo // RelatesTo required as per // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) { String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion); // Don't check for AddressingFaults as // Faults for requests with duplicate MessageId will have no wsa:RelatesTo if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) { throw new MissingAddressingHeaderException(addressingVersion.relatesToTag,packet); } } } } }