On Tue, Aug 14, 2012 at 7:51 AM, javakurious <javakuri...@gmail.com> wrote: > Hi > > I have a very straightforward question.. > > In my camel config, I am trying to handle exception be returning a static > xml response, indicating that there was an error. > > So, in <onException> tag, I just send the message to a <direct> component in > a different route. And for each message in that <direct> component I just > want to return content of a static xml file. > > How can I do that ? > > <route> > <from uri="direct:invalidCredentialQueue"/> > <to uri="file:templates/invalid-credentials-response.xml"/> > </route> > > Thanks for any help. >
You need to use the EIPs such as the content enricher to enrich the message with the content from the XML file http://camel.apache.org/content-enricher.html And in your use-case, you need to use the pollEnrich to poll the content from the file. > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/returning-xml-file-content-as-response-tp5717284.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen