Reputation: 21
I have a requirement to dynamically create camel-bindy endpoint for marshalling the input. Below is the sample code:
<dataFormats>
<bindy id="bookModel" type="Csv" classType="org.camelcookbook.transformation.csv.model.BookModel"/>
</dataFormats>
<route>
<from uri="direct:unmarshal"/>
<!-- <unmarshal ref="bookModel"/> -->
<to uri="dataformat:bindy:unmarshal?ref=bookModel"/>
</route>
Instead of unmarshal tag , I need to pass exchange to the equivalent end-point but getting error "Cannot find dataformat with name bindy"
Upvotes: 0
Views: 746
Reputation: 51441
There are multiple bindy data formats: csv, fixed length, key-value pair.
Their respective data format names to use with the "dataformat:" endpoint uri are:
So in your case you should specify unmarshalling like so:
<to uri="dataformat:bindy-csv:unmarshal?ref=bookModel"/>
Upvotes: 1