I am working on a POC with Apache Camel, I have to expose a WS through CXF, make some validation and transformation and call another WS.
I tried to use the validator but it seems that it’s only work with xml schema…
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:sdmoWSKweb" />
<to uri="log:input"/>
<bean ref="CartWSExtractProcessor"/>
<doTry>
<to uri="validator:/dtd/configurator.dtd"/>
<to uri="mock:valid"/>
<doCatch>
<exception>org.apache.camel.ValidationException</exception>
<to uri="mock:invalid"/>
</doCatch>
<doFinally>
<to uri="mock:finally"/>
</doFinally>
</doTry>
<to uri="xslt:messageCopyItem.xslt"/>
<setHeader headerName="operationName"><constant>copyItemMaster</constant></setHeader>
<to uri="cxf:bean:qadCopyWeb?defaultOperationName=copyItemMaster"/>
<to uri="log:Output"/>
</route>
I tried to generate and xsd version of my dtd with the W3.org tool but the result is not valid.
Is there any solution ?
Camel Validator does only work with XML/XSD or RelaxNG with the Jing component.
Otherwise, you should trying another DTD->XSD conversion tool or just manually create an XSD version…