public abstract class AbstractFaultCreatingValidatingInterceptor extends AbstractValidatingInterceptor
AbstractValidatingInterceptor that creates a SOAP Fault whenever the request message cannot
be validated. The contents of the SOAP Fault can be specified by setting the addValidationErrorDetail,
faultStringOrReason, or detailElementName properties. Further customizing can be
accomplished by overriding handleRequestValidationErrors.setAddValidationErrorDetail(boolean),
setFaultStringOrReason(String),
DEFAULT_FAULTSTRING_OR_REASON,
setDetailElementName(javax.xml.namespace.QName),
DEFAULT_DETAIL_ELEMENT_NAME,
AbstractValidatingInterceptor.handleResponseValidationErrors(org.springframework.ws.context.MessageContext,org.xml.sax.SAXParseException[])| Modifier and Type | Field and Description |
|---|---|
static QName |
DEFAULT_DETAIL_ELEMENT_NAME
Default SOAP Fault Detail name used when a validation errors occur on the request.
|
static String |
DEFAULT_FAULTSTRING_OR_REASON
Default SOAP Fault string used when a validation errors occur on the request.
|
logger| Constructor and Description |
|---|
AbstractFaultCreatingValidatingInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAddValidationErrorDetail()
Returns whether a SOAP Fault detail element should be created when a validation error occurs.
|
QName |
getDetailElementName()
Returns the fault detail element name when validation errors occur on the request.
|
String |
getFaultStringOrReason()
Sets the SOAP
faultstring or Reason used when validation errors occur on the request. |
Locale |
getFaultStringOrReasonLocale()
Returns the SOAP fault reason locale used when validation errors occur on the request.
|
protected boolean |
handleRequestValidationErrors(MessageContext messageContext,
SAXParseException[] errors)
Template method that is called when the request message contains validation errors.
|
void |
setAddValidationErrorDetail(boolean addValidationErrorDetail)
Indicates whether a SOAP Fault detail element should be created when a validation error occurs.
|
void |
setDetailElementName(QName detailElementName)
Sets the fault detail element name when validation errors occur on the request.
|
void |
setFaultStringOrReason(String faultStringOrReason)
Sets the SOAP
faultstring or Reason used when validation errors occur on the request. |
void |
setFaultStringOrReasonLocale(Locale faultStringOrReasonLocale)
Sets the SOAP fault reason locale used when validation errors occur on the request.
|
afterCompletion, afterPropertiesSet, getSchemaLanguage, getSchemas, getValidationRequestSource, getValidationResponseSource, handleFault, handleRequest, handleResponse, handleResponseValidationErrors, setErrorHandler, setSchema, setSchemaLanguage, setSchemas, setValidateRequest, setValidateResponse, setXsdSchema, setXsdSchemaCollectioncreateTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transformpublic static final QName DEFAULT_DETAIL_ELEMENT_NAME
public static final String DEFAULT_FAULTSTRING_OR_REASON
public AbstractFaultCreatingValidatingInterceptor()
public boolean getAddValidationErrorDetail()
SoapMessage. Defaults to true.SoapFault.addFaultDetail()public void setAddValidationErrorDetail(boolean addValidationErrorDetail)
SoapMessage. Defaults to true.SoapFault.addFaultDetail()public QName getDetailElementName()
public void setDetailElementName(QName detailElementName)
DEFAULT_DETAIL_ELEMENT_NAME.DEFAULT_DETAIL_ELEMENT_NAMEpublic String getFaultStringOrReason()
faultstring or Reason used when validation errors occur on the request.public void setFaultStringOrReason(String faultStringOrReason)
faultstring or Reason used when validation errors occur on the request.
It is only added when the underlying message is a SoapMessage. Defaults to
DEFAULT_FAULTSTRING_OR_REASON.DEFAULT_FAULTSTRING_OR_REASONpublic Locale getFaultStringOrReasonLocale()
public void setFaultStringOrReasonLocale(Locale faultStringOrReasonLocale)
SoapMessage. Defaults to English.Locale.ENGLISHprotected boolean handleRequestValidationErrors(MessageContext messageContext, SAXParseException[] errors) throws TransformerException
false, and creates a client or
sender SoapFault, adding a SoapFaultDetail with all errors if the
addValidationErrorDetail property is true.handleRequestValidationErrors in class AbstractValidatingInterceptormessageContext - the message contexterrors - the validation errorstrue to continue processing the request, false (the default) otherwiseTransformerException