camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khong07 <herio...@gmail.com>
Subject marshal() with MarshalProcessor
Date Wed, 20 Feb 2013 00:03:26 GMT
Hi,
i have a route
    from("start").routeId("start").
	marshal().json(JsonLibrary.Jackson)
	.to("seda:next");

    producerTemplate.send(foo);

It's worked.

But i want send foo directly to seda:next, how i can do with
MarshalProcessor?
I tried:
    marshalProcessor = new
MarshalProcessor(camelContext.resolveDataFormat("json-jackson"));
    ...
    producerTemplate.asyncCallback("seda:next",
				new Processor() {
			
					@Override
					public void process(Exchange exchange) throws Exception {
						exchange.getIn().setBody(foo);
						marshalProcessor.process(exchange);
					}
				});

but it doesn't work?

Any idea?



--
View this message in context: http://camel.465427.n5.nabble.com/marshal-with-MarshalProcessor-tp5727842.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message