@Override public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { if (logFault && isLogEnabled()) { logMessageSource("Fault: ", getSource(messageContext.getResponse())); } return true; }
@Bean public SoapEnvelopeLoggingInterceptor loggingInterceptor() { return new SoapEnvelopeLoggingInterceptor(); }
@Override public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { if (logFault && logger.isDebugEnabled()) { logMessageSource("Fault: ", getSource(messageContext.getResponse())); } return true; }
SoapMessage response = (SoapMessage) messageContext.getResponse(); SoapBody body = response.getSoapBody(); SoapFault fault = body.addClientOrSenderFault(getFaultStringOrReason(), getFaultStringOrReasonLocale()); if (getAddValidationErrorDetail()) { SoapFaultDetail detail = fault.addFaultDetail(); for (SAXParseException error : errors) { SoapFaultDetailElement detailElement = detail.addFaultDetailElement(getDetailElementName()); detailElement.addText(error.getMessage());
@Override public boolean understands(SoapHeaderElement header) { EndpointInterceptor delegate = getDelegate(); if (delegate instanceof SoapEndpointInterceptor) { return ((SoapEndpointInterceptor) delegate).understands(header); } else { return false; } } }
@Override public boolean handleRequest(MessageContext messageContext, Object endpoint) throws IOException, SAXException, TransformerException { // validate payload boolean reqValResult = super.handleRequest(messageContext, endpoint); // validate header if (reqValResult && validateHeader && !ignoreRequest(messageContext)) { SaajSoapMessage soapMessage = (SaajSoapMessage) messageContext.getRequest(); SoapHeader soapHeader = soapMessage.getSoapHeader(); ValidationException[] errors = validateHeader(soapHeader); if (!ObjectUtils.isEmpty(errors)) { return handleHeaderValidationErrors(messageContext, errors); } else if (logger.isDebugEnabled()) { logger.debug("Request header validated"); } } return reqValResult; }
SoapMessage response = (SoapMessage) messageContext.getResponse(); SoapBody body = response.getSoapBody(); SoapFault fault = body.addClientOrSenderFault(getFaultStringOrReason(), getFaultStringOrReasonLocale()); if (getAddValidationErrorDetail()) { SoapFaultDetail detail = fault.addFaultDetail(); for (SAXParseException error : errors) { SoapFaultDetailElement detailElement = detail.addFaultDetailElement(getDetailElementName()); detailElement.addText(error.getMessage());
@Override public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { if (logFault && isLogEnabled()) { logMessageSource("Fault: ", getSource(messageContext.getResponse())); } return true; }
@Override public boolean understands(SoapHeaderElement header) { EndpointInterceptor delegate = getDelegate(); if (delegate instanceof SoapEndpointInterceptor) { return ((SoapEndpointInterceptor) delegate).understands(header); } else { return false; } } }
@Bean public AnnotationActionEndpointMapping endpointMapping() { AnnotationActionEndpointMapping endpointMapping = new AnnotationActionEndpointMapping(); endpointMapping.setMessageSender(messageSender()); endpointMapping.setPreInterceptors(new EndpointInterceptor[] { new SoapEnvelopeLoggingInterceptor()}); return endpointMapping; }
SoapMessage response = (SoapMessage) messageContext.getResponse(); SoapBody body = response.getSoapBody(); SoapFault fault = body.addClientOrSenderFault(getFaultStringOrReason(), getFaultStringOrReasonLocale()); if (getAddValidationErrorDetail()) { SoapFaultDetail detail = fault.addFaultDetail(); for (SAXParseException error : errors) { SoapFaultDetailElement detailElement = detail.addFaultDetailElement(getDetailElementName()); detailElement.addText(error.getMessage());
@Override public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { if (logFault && isLogEnabled()) { logMessageSource("Fault: ", getSource(messageContext.getResponse())); } return true; }
@Override public boolean understands(SoapHeaderElement header) { EndpointInterceptor delegate = getDelegate(); if (delegate instanceof SoapEndpointInterceptor) { return ((SoapEndpointInterceptor) delegate).understands(header); } else { return false; } } }
SoapMessage response = (SoapMessage) messageContext.getResponse(); SoapBody body = response.getSoapBody(); SoapFault fault = body.addClientOrSenderFault(getFaultStringOrReason(), getFaultStringOrReasonLocale()); if (getAddValidationErrorDetail()) { SoapFaultDetail detail = fault.addFaultDetail(); for (SAXParseException error : errors) { SoapFaultDetailElement detailElement = detail.addFaultDetailElement(getDetailElementName()); detailElement.addText(error.getMessage());
public boolean understands(SoapHeaderElement header) { EndpointInterceptor delegate = getDelegate(); if (delegate instanceof SoapEndpointInterceptor) { return ((SoapEndpointInterceptor) delegate).understands(header); } else { return false; } } }