camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Set exchange property to a Map?
Date Thu, 20 Jan 2011 12:12:46 GMT
Hi

>From Camel 2.6 onwards you can do

<setProperty ...>
  <simple>ref:xxx</simple>
</setProperty>

Where xxx is the id of the bean to lookup.


On Thu, Jan 20, 2011 at 10:16 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> Hi
>
> Well spotted. I have created a ticket
> https://issues.apache.org/jira/browse/CAMEL-3564
>
>
>
> On Thu, Jan 20, 2011 at 8:21 AM, unmarshall <unmarshall@gmail.com> wrote:
>>
>> Hi,
>>
>> I am trying to set a property on the camel exchange. Using Spring XML the
>> only way i found to set that was using <camel:setProperty>. The problem is
>> that the value can only be of specific types and i could not find a type
>> which would help me set a Map as a value against a key.
>>
>> If i look at DefaultExchange then the properties are stored as a Map<String,
>> Object> and it provides a method to set a property setProperty(String key,
>> Object value)
>>
>> Is that a limitation while using Spring XML for creating camel routes?
>>
>> What i have done is i have defined a bean:
>>        <bean id="xiHeaderMap"
>> class="org.springframework.beans.factory.config.MapFactoryBean">
>>                <property name="sourceMap">
>>                        <map>
>>                                <entry key="A" value=""/>
>>                                <entry key="B" value="serviceB"/>
>>                                <entry key="C" value=""/>
>>                                <entry key="D" value="serviceH"/>
>>                                <entry key="E" value="{http://h-und-b.de/}CXFGreetMe"/>
>>                        </map>
>>                </property>
>>        </bean>
>>
>> Now i wanted to set this Map against a Key value on the Camel exchange
>> Property Map. How can i do that using Spring XML?
>>
>> Best Regards,
>> Madhav
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Set-exchange-property-to-a-Map-tp3349171p3349171.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>



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

Mime
View raw message