private void checkUnderstoodHeaders(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { //the TCK expects the getHeaders method to always be //called. If there aren't any headers in the message, //THe MustUnderstandInterceptor quickly returns without //trying to calculate the understood headers. Thus, //we need to call it here. getUnderstoodHeaders(); } }
private void checkUnderstoodHeaders(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { //the TCK expects the getHeaders method to always be //called. If there aren't any headers in the message, //THe MustUnderstandInterceptor quickly returns without //trying to calculate the understood headers. Thus, //we need to call it here. getUnderstoodHeaders(); } }
private void checkUnderstoodHeaders(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { //the TCK expects the getHeaders method to always be //called. If there aren't any headers in the message, //THe MustUnderstandInterceptor quickly returns without //trying to calculate the understood headers. Thus, //we need to call it here. getUnderstoodHeaders(); } }
private void checkUnderstoodHeaders(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { //the TCK expects the getHeaders method to always be //called. If there aren't any headers in the message, //THe MustUnderstandInterceptor quickly returns without //trying to calculate the understood headers. Thus, //we need to call it here. getUnderstoodHeaders(); } }
private void checkUnderstoodHeaders(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { //the TCK expects the getHeaders method to always be //called. If there aren't any headers in the message, //THe MustUnderstandInterceptor quickly returns without //trying to calculate the understood headers. Thus, //we need to call it here. getUnderstoodHeaders(); } }
private void checkUnderstoodHeaders(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { //the TCK expects the getHeaders method to always be //called. If there aren't any headers in the message, //THe MustUnderstandInterceptor quickly returns without //trying to calculate the understood headers. Thus, //we need to call it here. getUnderstoodHeaders(); } }
public void handleMessage(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { return; } SoapVersion soapVersion = soapMessage.getVersion(); Set<Header> mustUnderstandHeaders = new HashSet<>(); Set<URI> serviceRoles = new HashSet<>(); Set<QName> notUnderstandHeaders = new HashSet<>(); Set<Header> ultimateReceiverHeaders = new HashSet<>(); Set<QName> mustUnderstandQNames = new HashSet<>(); initServiceSideInfo(mustUnderstandQNames, soapMessage, serviceRoles, paramHeaders); buildMustUnderstandHeaders(mustUnderstandHeaders, soapMessage, serviceRoles, ultimateReceiverHeaders); checkUnderstand(mustUnderstandHeaders, mustUnderstandQNames, notUnderstandHeaders); if (!notUnderstandHeaders.isEmpty()) { if (!isRequestor(soapMessage)) { soapMessage.put(MustUnderstandInterceptor.UNKNOWNS, notUnderstandHeaders); soapMessage.getInterceptorChain().add(ending); } else { throw new SoapFault(new Message("MUST_UNDERSTAND", BUNDLE, notUnderstandHeaders), soapVersion.getMustUnderstand()); } } if (!ultimateReceiverHeaders.isEmpty() && !isRequestor(soapMessage)) { checkUltimateReceiverHeaders(ultimateReceiverHeaders, mustUnderstandQNames, soapMessage); } } @Override
public void handleMessage(SoapMessage soapMessage) { Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(soapMessage); if (soapMessage.getHeaders().isEmpty() && paramHeaders.isEmpty()) { return; } SoapVersion soapVersion = soapMessage.getVersion(); Set<Header> mustUnderstandHeaders = new HashSet<>(); Set<URI> serviceRoles = new HashSet<>(); Set<QName> notUnderstandHeaders = new HashSet<>(); Set<Header> ultimateReceiverHeaders = new HashSet<>(); Set<QName> mustUnderstandQNames = new HashSet<>(); initServiceSideInfo(mustUnderstandQNames, soapMessage, serviceRoles, paramHeaders); buildMustUnderstandHeaders(mustUnderstandHeaders, soapMessage, serviceRoles, ultimateReceiverHeaders); checkUnderstand(mustUnderstandHeaders, mustUnderstandQNames, notUnderstandHeaders); if (!notUnderstandHeaders.isEmpty()) { if (!isRequestor(soapMessage)) { soapMessage.put(MustUnderstandInterceptor.UNKNOWNS, notUnderstandHeaders); soapMessage.getInterceptorChain().add(ending); } else { throw new SoapFault(new Message("MUST_UNDERSTAND", BUNDLE, notUnderstandHeaders), soapVersion.getMustUnderstand()); } } if (!ultimateReceiverHeaders.isEmpty() && !isRequestor(soapMessage)) { checkUltimateReceiverHeaders(ultimateReceiverHeaders, mustUnderstandQNames, soapMessage); } } @Override
public void handleMessage(SoapMessage message) throws Fault { // throws soapFault after the response code 202 is set in OneWayProcessorInterceptor if (message.get(MustUnderstandInterceptor.UNKNOWNS) != null) { //we may not have known the Operation in the main interceptor and thus may not //have been able to get the parameter based headers. We now know the //operation and thus can remove those. Set<QName> unknowns = CastUtils.cast((Set<?>)message.get(MustUnderstandInterceptor.UNKNOWNS)); Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(message); unknowns.removeAll(paramHeaders); message.remove(MustUnderstandInterceptor.UNKNOWNS); if (!unknowns.isEmpty()) { throw new SoapFault(new Message("MUST_UNDERSTAND", BUNDLE, unknowns), message.getVersion().getMustUnderstand()); } } } }
public void handleMessage(SoapMessage message) throws Fault { // throws soapFault after the response code 202 is set in OneWayProcessorInterceptor if (message.get(MustUnderstandInterceptor.UNKNOWNS) != null) { //we may not have known the Operation in the main interceptor and thus may not //have been able to get the parameter based headers. We now know the //operation and thus can remove those. Set<QName> unknowns = CastUtils.cast((Set<?>)message.get(MustUnderstandInterceptor.UNKNOWNS)); Set<QName> paramHeaders = HeaderUtil.getHeaderQNameInOperationParam(message); unknowns.removeAll(paramHeaders); message.remove(MustUnderstandInterceptor.UNKNOWNS); if (!unknowns.isEmpty()) { throw new SoapFault(new Message("MUST_UNDERSTAND", BUNDLE, unknowns), message.getVersion().getMustUnderstand()); } } } }