Hmmm... sorry, but I don't think my suggestion will work: ItemDocuments is
not a List<ItemEntity> - so the split as I wrote will fail.

Just wondering if the approach shouldn't be:
1/ convert from XML to ItemsDocuments
2/ split the ItemDocuments into ItemDocument instances with a Splitter
configured with a POJO of your own
3/ you now have as many Exchanges as you have ItemDocument (because of the
split), each with an ItemDocument in the body. 
4/ the last step is to convert/transform an ItemDocument into an ItemEntity.
This can be done with a converter as you did, or using a custom POJO
processor
5/ finally, the exchange should now holds something your JPA destination
could accept.

(also learning Camel... so don't take everything I said for granted ;-)





--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-write-a-type-converter-tp5741592p5741625.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to