当前位置: 首页>>代码示例>>Java>>正文


Java MemberSubmissionAddressing类代码示例

本文整理汇总了Java中com.sun.xml.internal.ws.developer.MemberSubmissionAddressing的典型用法代码示例。如果您正苦于以下问题:Java MemberSubmissionAddressing类的具体用法?Java MemberSubmissionAddressing怎么用?Java MemberSubmissionAddressing使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MemberSubmissionAddressing类属于com.sun.xml.internal.ws.developer包,在下文中一共展示了MemberSubmissionAddressing类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkMandatoryHeaders

import com.sun.xml.internal.ws.developer.MemberSubmissionAddressing; //导入依赖的package包/类
@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);
            }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:MemberSubmissionWsaClientTube.java

示例2: checkMandatoryHeaders

import com.sun.xml.internal.ws.developer.MemberSubmissionAddressing; //导入依赖的package包/类
@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 = packet.getMessage().getHeaders().getAction(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);
            }
        }
    }
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:26,代码来源:MemberSubmissionWsaClientTube.java

示例3: checkMandatoryHeaders

import com.sun.xml.internal.ws.developer.MemberSubmissionAddressing; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:MemberSubmissionWsaServerTube.java


注:本文中的com.sun.xml.internal.ws.developer.MemberSubmissionAddressing类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。