com.sun.xml.internal.ws.developer.MemberSubmissionAddressing Java Examples

The following examples show how to use com.sun.xml.internal.ws.developer.MemberSubmissionAddressing. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MemberSubmissionWsaClientTube.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #2
Source File: MemberSubmissionWsaClientTube.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #3
Source File: MemberSubmissionWsaClientTube.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #4
Source File: MemberSubmissionWsaClientTube.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #5
Source File: MemberSubmissionWsaClientTube.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #6
Source File: MemberSubmissionWsaClientTube.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #7
Source File: MemberSubmissionWsaClientTube.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #8
Source File: MemberSubmissionWsaClientTube.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@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);
            }
        }
    }
}
 
Example #9
Source File: MemberSubmissionWsaServerTube.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}
 
Example #10
Source File: MemberSubmissionWsaServerTube.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}
 
Example #11
Source File: MemberSubmissionWsaServerTube.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}
 
Example #12
Source File: MemberSubmissionWsaServerTube.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}
 
Example #13
Source File: MemberSubmissionWsaServerTube.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}
 
Example #14
Source File: MemberSubmissionWsaServerTube.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}
 
Example #15
Source File: MemberSubmissionWsaServerTube.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}
 
Example #16
Source File: MemberSubmissionWsaServerTube.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@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);
    }
}