camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1450177 - /camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml
Date Tue, 26 Feb 2013 14:11:03 GMT
Author: davsclaus
Date: Tue Feb 26 14:11:02 2013
New Revision: 1450177

URL: http://svn.apache.org/r1450177
Log:
CAMEL-6047: Added headerName option to validator component. Thanks to Laurynas Lubys for the
patch.

Modified:
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml?rev=1450177&r1=1450176&r2=1450177&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml
Tue Feb 26 14:11:02 2013
@@ -22,8 +22,8 @@
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
 
-    <!-- START SNIPPET: example -->
     <camelContext xmlns="http://camel.apache.org/schema/spring">
+        <!-- START SNIPPET: example -->
         <route>
             <from uri="direct:start"/>
             <doTry>
@@ -38,7 +38,34 @@
                 </doFinally>
             </doTry>
         </route>
+        <!-- END SNIPPET: example -->
+
+        <route>
+            <from uri="direct:startHeaders"/>
+            <doTry>
+                <to uri="validator:org/apache/camel/component/validator/schema.xsd?headerName=headerToValidate"/>
+                <to uri="mock:valid"/>
+                <doCatch>
+                    <exception>org.apache.camel.ValidationException</exception>
+                    <to uri="mock:invalid"/>
+                </doCatch>
+                <doFinally>
+                    <to uri="mock:finally"/>
+                </doFinally>
+            </doTry>
+        </route>
+
+        <route>
+            <from uri="direct:startNoHeaderException"/>
+            <to uri="validator:org/apache/camel/component/validator/schema.xsd?headerName=headerToValidate"/>
+            <to uri="mock:valid"/>
+        </route>
+
+        <route>
+            <from uri="direct:startNullHeaderNoFail"/>
+            <to uri="validator:org/apache/camel/component/validator/schema.xsd?headerName=headerToValidate&amp;failOnNullHeader=false"/>
+            <to uri="mock:valid"/>
+        </route>
     </camelContext>
-    <!-- END SNIPPET: example -->
 
 </beans>



Mime
View raw message