You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "dominic.michel@kaufhof.de" <do...@kaufhof.de> on 2015/11/30 20:59:56 UTC

How to obtain Exchange object in TypeConverter?

Hi.

I'm using Camel 2.16.0 and wrote a TypeConverter which expects the Exchange
Object as a second method parameter, as described in
http://camel.apache.org/type-converter.html#TypeConverter-Exchangeparameter
However, the Exchange Parameter is received as null because when calling
camelContext.getTypeConverter.mandatoryConvertTo[(clazz, body) it just calls
mandatoryConvertTo(type, null, value); (Exchange is the second parameter
here)

Now i'm trying to figure out what's the best way to obtain an Exchange
object in my Converter. Since my converter doesn't know about the
CamelContext or the endpoint, i cannot create a new DefaultExchange.
Any help is appreciated.

Kind regards,
Dominic



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-obtain-Exchange-object-in-TypeConverter-tp5774573.html
Sent from the Camel - Users mailing list archive at Nabble.com.