This component has been deprecated in favor to servicemix-validation component.
The component is pretty simple and straightforward; its configured with a schema document and optionally an error handler factory implementing the MessageAwareErrorHandlerFactory interface. This factory produces an error handler which conforms to the MessageAwareErrorHandler interface. If the inbound document is valid, it continues on its way to the ultimate destination. Otherwise a fault is returned in the message exchange.
ServiceMix configuration using the default error handler:
The default error handler simply counts the number of warnings, errors and fatal errors and if the number of errors and fatal errors is greater than zero then a fault message is returned. Another implementation is available which will capture the messages and output them in an xml format as below:
Each warning, error or fatal error message will produce a node as shown above. The rootPath represents an arbitrarily deep node path at which to locate the message nodes. The root element also has a default xml namespace attached to it. The ServiceMix configuration for this component is outlined below:
And here is the bean definition for the MessageAggregatingErrorHandler (Valid for ServiceMix 3.1 only):
Only the first two properties are mandatory, the includeStackTraces property will default to false and is included in the above configuration to highlight it's use. If it is set to true the error handler will output stacktraces of the error messages into the fault xml.