title: How to move a file after error in Apache Camel using doCatch
body: <p>Can anyone help me in this issue about apache camel?
  I'm trying to execute a route that acts as follow:</p>
  
  <ol>
  <li>Send a XML archive to a Webservice</li>
  <li>If the response is OK, move this file to a directory called
  "successImport"</li>
  <li>If the response fails, move this same file to a directory called
  "failImport"</li>
  </ol>
  
  <p>The actual problem is:
  Camel is moving my files to both directoris, failImport and successImport, even when the webservice process fail.</p>
  
  <p>This is a snippet of my code:</p>
  
  <pre><code>String webservice310 = "localhost:8080/api/importxml/version310";
  String webservice200 = "localhost:8080/api/importxml/version200";
  String dir = "c:/imports/";
  
  from("file:" + dir + "?include=.*.xml&amp;delay=1000&amp;move=successImport")
  .process(new ProcessorXml())
  .doTry()
      .choice()
          .when(header("version").isEqualTo("3.10"))
              .to("restlet:"+ webservice310 + "?restletMethod=post")
          .when(header("version").isEqualTo("2.00"))
              .to("restlet:"+ webservice200 + "?restletMethod=post")
  .endDoTry()
  .doCatch(XmlBindException.class)
      .to("file://" + dir + "failImport");
  </code></pre>
  
  <p>When I change the route for something like this:</p>
  
  <pre><code>from("file:" + dir + "?include=.*.xml&amp;delay=1000&amp;move=successImport&amp;moveFailed=failImport")
  </code></pre>
  
  <p>Camel works good, but any error goes to the "failImport" even though this is not triggered by the exception I'm expecting.
  How can I move only exceptions that I'm specifying on my route "doCatch" block?</p>