On Fri, May 23, 2014 at 4:27 PM, Matt Raible wrote:
> That worked - thanks!
>
> .setHeader("subject", simple("Message Broker Error ({{ESB_ENV}}) -
> ${exception.class.simpleName}"))
> .transform(simple("${exception.message}\n\nStacktrace
> Details:\n\n${exception.stacktrace}"))
> .to("freemarker
That worked - thanks!
.setHeader("subject", simple("Message Broker Error ({{ESB_ENV}}) -
${exception.class.simpleName}"))
.transform(simple("${exception.message}\n\nStacktrace
Details:\n\n${exception.stacktrace}"))
.to("freemarker:/templates/mail/error.ftl")
.to("smtp://{{mail.host}}?contentType
You can set the subject as a header, then the smtp will use that
Something like this (not wrote the code in this email)
.setHeader("subject", simple("Message Broker Error
${exception.getClassName()}"))
On Fri, May 23, 2014 at 3:45 PM, Matt Raible wrote:
> I was able to figure out how to set head
I was able to figure out how to set headers and retrieve those variables in the
FreeMarker template. However, I'm still unable to access them in the SMTP
endpoint. Also, if I set the "exception", I can't call ${exception.stacktrace}
in FreeMarker like I can in a simple transform. Here's what I h
Hi
Yeah a good idea is to check the unit tests for camel-freemarker for examples.
Also take a note that Camel stores various information from the
Exchange etc. and provides that to freemarker in the process method.
https://github.com/apache/camel/blob/master/components/camel-freemarker/src/main/j
Matt,
You ca retrieve using ${body} and ${headers.} within the freemarker
template (
https://github.com/apache/camel/blob/master/components/camel-freemarker/src/test/resources/org/apache/camel/component/freemarker/letterWithoutHeader.ftl#L21)
the content of your body or headers/properties like
I figured out a solution for this. First of all, I changed my route to be a
Spring bean so dependency injection would work:
@Component
public class FooRoute extends RouteBuilder {
}
Then I changed my Camel configuration to use Spring annotations and
@ComponentScan. I also configured things so p
Hello all,
I'm getting up to speed on Apache Camel and trying to replace a "message
flow" that was originally written for IBM Message Broker 6.1. The flow
involves receiving input from a SOAP service, looking up a value in a
database, and returning that to the client (again, via SOAP). I have a
ro