5 Replies Latest reply on Jun 3, 2014 8:38 AM by Tomohisa igarashi

    How to use ref-attribute from apache-camel within SwitchYard

    Martin E. Newbie

      I have a SwitchYard-Application (Version: 1.1) with an camel-service-component implemented via xml-routes.

      Within xml-route i want to throw any exception.

      I found the tag: "<throwException ref="myFail"/>" for that.

      But on deployment this lead to the following exception:

      Caused by: java.lang.IllegalArgumentException: exception or ref must be specified on: ThrowException[ref:myFail]


      Certainly because no implementing-class for "myFail" is configured.

      But how exactly i can do this?


      Example xml-route:

      <?xml version="1.0" encoding="UTF-8"?>

      <routes xmlns="http://camel.apache.org/schema/spring">

           <route streamCache="true"> <from uri="switchyard://Test" />

                <throwException ref="myFail"/>

           </route>

      </routes>