camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dominic.michel@kaufhof.de" <dominic.mic...@kaufhof.de>
Subject How to obtain Exchange object in TypeConverter?
Date Mon, 30 Nov 2015 19:59:56 GMT
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.

Mime
View raw message