I'm using apacheservicemix and I try to validate a xml document with apache camel. I have this route called students_route.xml :
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://ift.tt/KL6wHM"
xmlns:xsi="http://ift.tt/ra1lAU"
xsi:schemaLocation="
http://ift.tt/KL6wHM
http://ift.tt/KL6wY3">
<camelContext xmlns="http://ift.tt/1asmeRt">
<route>
<from uri="file:project/students.xml"/>
<doTry>
<to uri="validator:file:project/students.xsd"/>
<to uri="file:valid"/>
<doCatch>
<exception>org.apache.camel.ValidationException</exception>
<to uri="file:invalid"/>
</doCatch>
<doFinally>
<to uri="file:finally"/>
</doFinally>
</doTry>
</route>
</camelContext>
</blueprint>
I created 3 directories called: valid, invalid and finally. After I run in karaf "start students_route.xml" nothing happens. When I look into logs I get no errors just some messages like this: "Route: route2 started and consuming from: Endpoint[file://project/students.xml]".I imagine that a file should be created under valid/invalid directories whether the xml file is valid or not.
I'm new to this technologies and I have no idea how to make this work. I would really appreciate your help. Thank you in advance!
No comments:
Post a Comment