You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by DRy <di...@itellium.com> on 2009/12/04 07:33:38 UTC

Splitting nested objects ...

Hi,

I have to split a message that contains an object (lets say Customer) that
contains a list of other objects (let say List<Address>) in its body into n
messages (where n is size of List<Adress>) that contain the nested object
(lets say Adress[i]) in the body (all the same header as the original
message). 

How can this be done in an easy way (with a splitter) ... ?

The aim ist to get one Message (with one Customer in the body) out from a
JMS-Queue and put n messages (with one Adress[i] in the body) to a JMSQueue
....


DRy


-- 
View this message in context: http://old.nabble.com/Splitting-nested-objects-...-tp26635785p26635785.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Splitting nested objects ...

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Dec 4, 2009 at 7:33 AM, DRy <di...@itellium.com> wrote:
>
> Hi,
>
> I have to split a message that contains an object (lets say Customer) that
> contains a list of other objects (let say List<Address>) in its body into n
> messages (where n is size of List<Adress>) that contain the nested object
> (lets say Adress[i]) in the body (all the same header as the original
> message).
>
> How can this be done in an easy way (with a splitter) ... ?
>
> The aim ist to get one Message (with one Customer in the body) out from a
> JMS-Queue and put n messages (with one Adress[i] in the body) to a JMSQueue
> ....

You can also create your own Iterator class who knows to walk the body.
Then provide that to the splitter.


>
>
> DRy
>
>
> --
> View this message in context: http://old.nabble.com/Splitting-nested-objects-...-tp26635785p26635785.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus