本文整理汇总了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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}