JBI Support deprecated in Apache ServiceMix 4

JBI 1.0 support is available in Apache ServiceMix 4 to allow existing users to migrate more easily to this latest version - if you're a new user, you should consider JBI deprecated and not use it for your project. Take a look at our technology selection guidelines for more information.



The ServiceMix Validation component provides schema validation of documents using JAXP 1.3 and XMLSchema or RelaxNG.

Namespace and xbean.xml

The namespace URI for the servicemix-bean JBI component is http://servicemix.apache.org/validation/1.0. This is an example of an xbean.xml file with a namespace definition with prefix bean.

<beans xmlns:scripting="http://servicemix.apache.org/validation/1.0">

  <!-- add validation:endpoint here -->


Endpoint types

The servicemix-validation component defines a single endpoint type:

  • validation:endpoint :: Validates the incoming XML message - can be configured to fail the exchange or to send validation errors back to the sender in the message body.


Endpoint properties

Property Name Type Description
endpoint java.lang.String The name of the endpoint.
errorHandlerFactory org.apache.servicemix.validation.handler.MessageAwareErrorHandlerFactory Set a custom error handler to deal with validation errors. Defaults to a <code>CountingErrorHandlerFactory</code>.
handlingErrorMethod java.lang.String Configure how validation errors should be handled. Default value is <code>FAULT_JBI</code>. <dl> <dt><code>FAULT_JBI</code></dt> <dd>A jbi exception is thrown on validation errors (depending on used MEP)</dd> <dt><code>FAULT_FLOW</code></dt> <dd>The validation result will be sent in out / fault message (depending on used MEP)</dd> </dl>
interfaceName javax.xml.namespace.QName The qualified name of the interface exposed by the endpoint.
noNamespaceSchemaResource org.springframework.core.io.Resource Set the validation schema to be used when no namespace is specified.
schema javax.xml.validation.Schema Set the validation schema instance.
schemaLanguage java.lang.String Set the validation schema language. Defaults to <code>http://www.w3.org/2001/XMLSchema</code>
schemaResource org.springframework.core.io.Resource Set the validation schema as a Spring Resource.
schemaSource javax.xml.transform.Source Set the validation schema as an XML Source.
service javax.xml.namespace.QName The qualified name of the service the endpoint exposes.