Hello fellows,

after some fight I got the solution for the problem described above.

I added a processor to get the value from ArrayList and set as the exchange
body. The processor is like this:

public class EventExchangeBodyProcessor implements Processor {

        @Override
        public void process(Exchange exchange) throws Exception {
                @SuppressWarnings("unchecked")
                ArrayList<HashMap&lt;String, Object>> body =  
(ArrayList<HashMap&lt;String, Object>>) exchange.getIn().getBody();
                HashMap<String, Object> t = (HashMap<String, Object>) 
body.get(0);
        
exchange.getIn().setBody(t.get("com.test.integration.camel.spring.poc.file.CSVEventRecordBean"));
        }

}

This is straight forward and by the time I didn't worried about Exception
Handling. Now I will fight with other problems to write to jpa endpoint.

Cheers.

--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Process-CSV-using-bindy-and-sending-to-JPA-tp5494547p5502297.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to