Validating XML messages against multiple schemas

Solution Unverified - Updated -

Issue

Is there a way with Camel to validate against a number of XML schemas? Ultimately, I'd like to be able to do something like:

<route>
  <from uri="activemq:{{queueName}}" />
  <doTry>
    <to uri="validator:xsdspackage" />
    <doCatch>
      <exception>org.apache.camel.ValidationException</exception>
      <to uri="{{invalidEndpoint}}" />
    </doCatch>
    <doFinally>
      <recipientList>
        <simple>activemq:${in.header.DESTINATION}</simple>
      </recipientList>
    </doFinally>
  </doTry>
</route>

Environment

  • Fuse Mediation Router 2.9.X
  • Fuse Mediation Router 2.10.X

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.