apache camel - How do I set an exchange header to the result of a route? -


i have camel route has step calls subroute convert text portion of body pdf. unfortunately camel-pdf not preserve headers. there way can value of subroute without losing current exchange?

sub route

from("seda:generate-pdf")  // original in header .setheader("original", body())  // create pdf .to("pdf:create?textprocessingfactory=autoformatting") // uhoh! headers gone :(  // set pdf header doc server .setheader("pdf", body())  // move indicator body .setbody(header("original")) // <-- no longer exists 

main route

// snip  // unmarshal java  .unmarshal().json(jsonlibrary.gson, myreportcontainingtext.class)  // call sub-route generate pdf .inout("seda:generate-pdf") // uhoh! headers gone :(  // snip 

instead of saving stuff in headers can removed when pass 1 route save them exchange properties. example:

.setproperty("pdf", body()) .setproperty("pdf", simple("${body}") 

exchange property exist long exchange exist.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -