Hi
You can check the XML reference page to find the Camel version and the
XSD and thus which XML tags
you can use:
http://camel.apache.org/xml-reference.html
The attribute for the name is: headerName
So it should be
<camel:setHeader headerName="subject"><constant>Hello
World</constant></camel:setHeader>
On Wed, May 27, 2009 at 6:18 PM, Arin <[email protected]> wrote:
>
> Please see below configuration, I am getting error Invalid content was found
> starting with element 'camel:setHeader'. Can anyone correct me as where I
> should <camel:setHeader>
>
> <camel:camelContext id="camel">
> <camel:template id="camelTemplate"/>
> <camel:endpoint id="invitationQueue" uri="${queue.invitation}"/>
> <camel:endpoint id="resetPasswordQueue"
> uri="${queue.resetPassword}"/>
> <camel:endpoint id="mailServer" uri="${mail.host}"/>
>
> <camel:setHeader name="subject"><constant>Hello
> World</constant></camel:setHeader>
>
> <camel:endpoint id="invitationVelocity"
> uri="velocity:com/irise/dc/invitation/data/invitation.vm"/>
>
> <camel:route>
> <!-- Route to send invitation -->
> <camel:from ref="invitationQueue"/>
> <camel:to ref="invitationVelocity"/>
> <camel:to ref="mailServer"/>
> </camel:route>
>
>
>
> </camel:camelContext>
>
> <alias alias="producerTemplate" name="camelTemplate"/>
> --
> View this message in context:
> http://www.nabble.com/How-to-set-from-id-and-subject-of-an-email-in-camel-context.com-tp23745547p23745843.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus