On Wed, Oct 12, 2011 at 2:15 PM, David Karlsen <davidkarl...@gmail.com> wrote:
> Can I control where camel will put the splitted value - or will it
> always be the body?

If you iterator returns an org.apache.camel.Message instance then
Camel will use that as is. Any other value will be regarded as the
body.


>
> 2011/10/11 Claus Ibsen <claus.ib...@gmail.com>:
>> On Mon, Oct 10, 2011 at 10:26 PM, David Karlsen <davidkarl...@gmail.com> 
>> wrote:
>>> Hi.
>>>
>>> I'd like to iterate over a header containing a list and doing a "to
>>> uri" for each value.
>>> Is this possible?
>>>
>>> The splitter seems to only support body values, and camel:loop seems
>>> to be count-oriented.
>>>
>>
>> The splitter supports using a custom expression, so you can refer to a 
>> header.
>> The splitter will then try to iterate that, so if the header is a
>> List/Collection etc. then it can do that out of the box.
>> I also believe if its a String value, then it will iterate using comma
>> separator.
>>
>> Alternative you can write your custom expression and use that, or use
>> a method call expression and return the list of values from the header
>> to split.
>>
>>> I could of course loop and use an expression for the list length and
>>> access it by index - but maybe something cleaner and down to the point
>>> exists OOTB?
>>>
>>> --
>>> --
>>> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cib...@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>
>
>
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to