You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fidoedidoe <ga...@sagepub.co.uk> on 2014/11/18 11:47:24 UTC

After using in XML DSL, my email body includes unwanted route metadata

Hi I'm new to camel, so forgive me for asking (more?) dumb question(s). With
help from this forum I've created a Multicast route, that emails
recipient(s) on completion. just baby steps for now..the logic / complexity
will expand as my understanding increases. 

In my real code (not the pseudo below) I'm successfully routing / delivering
a completion email *but* the body of the email contains what I'm describing
as additional route metadata outside of the text I'm setting using <setBody>
Any suggestions on what I'm overlooking / how to suppress the email body
items such as: "CamelFileLength", etc

Code:



Received Email body:



Many thanks! 



--
View this message in context: http://camel.465427.n5.nabble.com/After-using-setBody-in-XML-DSL-my-email-body-includes-unwanted-route-metadata-tp5759245.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: After using in XML DSL, my email body includes unwanted route metadata

Posted by fidoedidoe <ga...@sagepub.co.uk>.
I think I've found the answered my own question. The additional metadata is
(exchange?) header information, which can be cleared from the body using
<removeHeaders>. 

The final (pseudo) ends up looking like this: 





--
View this message in context: http://camel.465427.n5.nabble.com/After-using-setBody-in-XML-DSL-my-email-body-includes-unwanted-route-metadata-tp5759245p5759248.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: After using in XML DSL, my email body includes unwanted route metadata

Posted by fidoedidoe <ga...@sagepub.co.uk>.
Hi Claus

Good spot - that's an honest typo in my pseudo, my apologies, I've corrected
the original post. My actual code escapes &amp; as suggested. 



--
View this message in context: http://camel.465427.n5.nabble.com/After-using-setBody-in-XML-DSL-my-email-body-includes-unwanted-route-metadata-tp5759245p5759247.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: After using in XML DSL, my email body includes unwanted route metadata

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Is the uri of the smtp endpoint correct? In the code you use ? to
separate parameters, but you should use & which should be escaped in
xml, eg &amp;

On Tue, Nov 18, 2014 at 11:47 AM, fidoedidoe <ga...@sagepub.co.uk> wrote:
> Hi I'm new to camel, so forgive me for asking (more?) dumb question(s). With
> help from this forum I've created a Multicast route, that emails
> recipient(s) on completion. just baby steps for now..the logic / complexity
> will expand as my understanding increases.
>
> In my real code (not the pseudo below) I'm successfully routing / delivering
> a completion email *but* the body of the email contains what I'm describing
> as additional route metadata outside of the text I'm setting using <setBody>
> Any suggestions on what I'm overlooking / how to suppress the email body
> items such as: "CamelFileLength", etc
>
> Code:
>
>
>
> Received Email body:
>
>
>
> Many thanks!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/After-using-setBody-in-XML-DSL-my-email-body-includes-unwanted-route-metadata-tp5759245.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/