com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException Java Examples
The following examples show how to use
com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException.
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: W3CWsaServerTube.java From hottub with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #2
Source File: MemberSubmissionWsaClientTube.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@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: W3CWsaClientTube.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@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 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: W3CWsaServerTube.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #5
Source File: MemberSubmissionWsaClientTube.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@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: W3CWsaClientTube.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@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 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: W3CWsaServerTube.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #8
Source File: MemberSubmissionWsaClientTube.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@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: W3CWsaClientTube.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@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 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 #10
Source File: W3CWsaServerTube.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #11
Source File: MemberSubmissionWsaClientTube.java From hottub with GNU General Public License v2.0 | 6 votes |
@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 #12
Source File: W3CWsaClientTube.java From hottub with GNU General Public License v2.0 | 6 votes |
@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 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 #13
Source File: W3CWsaServerTube.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #14
Source File: MemberSubmissionWsaClientTube.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@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 #15
Source File: W3CWsaClientTube.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@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 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 #16
Source File: W3CWsaServerTube.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #17
Source File: MemberSubmissionWsaClientTube.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@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 #18
Source File: W3CWsaClientTube.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@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 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 #19
Source File: W3CWsaClientTube.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@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 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 #20
Source File: W3CWsaServerTube.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #21
Source File: W3CWsaServerTube.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@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); // find Req/Response or Oneway using WSDLModel(if it is availabe) WSDLBoundOperation wbo = getWSDLBoundOperation(packet); // Taking care of protocol messages as they do not have any corresponding operations if (wbo != null) { // if two-way and no wsa:MessageID is found if (!wbo.getOperation().isOneWay() && !foundMessageId) { throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet); } } }
Example #22
Source File: W3CWsaClientTube.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@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 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 #23
Source File: MemberSubmissionWsaClientTube.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@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 #24
Source File: MemberSubmissionWsaClientTube.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@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 #25
Source File: WsaTubeHelper.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public SOAPFault newMapRequiredFault(MissingAddressingHeaderException e) { QName subcode = addVer.mapRequiredTag; QName subsubcode = addVer.mapRequiredTag; String faultstring = addVer.getMapRequiredText(); try { SOAPFactory factory; SOAPFault fault; if (soapVer == SOAPVersion.SOAP_12) { factory = SOAPVersion.SOAP_12.getSOAPFactory(); fault = factory.createFault(); fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT); fault.appendFaultSubcode(subcode); fault.appendFaultSubcode(subsubcode); getMapRequiredDetail(e.getMissingHeaderQName(), fault.addDetail()); } else { factory = SOAPVersion.SOAP_11.getSOAPFactory(); fault = factory.createFault(); fault.setFaultCode(subsubcode); } fault.setFaultString(faultstring); return fault; } catch (SOAPException se) { throw new WebServiceException(se); } }
Example #26
Source File: WsaTubeHelper.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public SOAPFault newMapRequiredFault(MissingAddressingHeaderException e) { QName subcode = addVer.mapRequiredTag; QName subsubcode = addVer.mapRequiredTag; String faultstring = addVer.getMapRequiredText(); try { SOAPFactory factory; SOAPFault fault; if (soapVer == SOAPVersion.SOAP_12) { factory = SOAPVersion.SOAP_12.getSOAPFactory(); fault = factory.createFault(); fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT); fault.appendFaultSubcode(subcode); fault.appendFaultSubcode(subsubcode); getMapRequiredDetail(e.getMissingHeaderQName(), fault.addDetail()); } else { factory = SOAPVersion.SOAP_11.getSOAPFactory(); fault = factory.createFault(); fault.setFaultCode(subsubcode); } fault.setFaultString(faultstring); return fault; } catch (SOAPException se) { throw new WebServiceException(se); } }
Example #27
Source File: MemberSubmissionWsaServerTube.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@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 #28
Source File: MemberSubmissionWsaServerTube.java From hottub with GNU General Public License v2.0 | 5 votes |
@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 #29
Source File: WsaTubeHelper.java From hottub with GNU General Public License v2.0 | 5 votes |
public SOAPFault newMapRequiredFault(MissingAddressingHeaderException e) { QName subcode = addVer.mapRequiredTag; QName subsubcode = addVer.mapRequiredTag; String faultstring = addVer.getMapRequiredText(); try { SOAPFactory factory; SOAPFault fault; if (soapVer == SOAPVersion.SOAP_12) { factory = SOAPVersion.SOAP_12.getSOAPFactory(); fault = factory.createFault(); fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT); fault.appendFaultSubcode(subcode); fault.appendFaultSubcode(subsubcode); getMapRequiredDetail(e.getMissingHeaderQName(), fault.addDetail()); } else { factory = SOAPVersion.SOAP_11.getSOAPFactory(); fault = factory.createFault(); fault.setFaultCode(subsubcode); } fault.setFaultString(faultstring); return fault; } catch (SOAPException se) { throw new WebServiceException(se); } }
Example #30
Source File: MemberSubmissionWsaServerTube.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@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); } }