camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "calyan.bandi" <calyan.ba...@gmail.com>
Subject Re: Apache Camel bean parameter binding issue with Spring DSL
Date Sat, 03 Oct 2015 07:46:35 GMT
Hi,

You may try one of the below two approaches:

1. Redefine your method signature and use the Bean annotations.

public void transformBodyUsingStyleSheet(Exchange exchange,
@Header("organizationStyleSheet") String styleSheet)
{
 ..
}

2. If the above didn't work, modify the bean delcaration in your xml file as
below and have the method signature in java to hold the Header annotation. 
<bean beanType="foo.bar.util.Utils" method="transformBodyUsingStyleSheet"/>

This will ensure that camel will apply its internal rules to match the exact
method with the signatures provided in the method. 

I have a similar use case in my project and both the approaches worked well
for me. I am using camel version of 2.13.2

Thanks,
Kalyan



--
View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-bean-parameter-binding-issue-with-Spring-DSL-tp5772200p5772208.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message