servicemix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Madesclair Vivian" <>
Subject RE: Servicemix adding and removing <META> tags in messages
Date Tue, 07 Jul 2009 12:46:11 GMT
Anyone has any insights about this? The fact that it removes my tag is quite annoying a behavior.

Best regards,

-----Message d'origine-----
De : Madesclair Vivian [] 
Envoyé : vendredi 3 juillet 2009 11:04
À :
Objet : Servicemix adding and removing <META> tags in messages

I am working on a SA that receive HTTP post requests and send emails with the content of the
request. The content is HTML, and I have to encode it in UTF-8 (otherwise special characters
raise exception in smx). The issue I got, is that the mail I receive are not decoded and still
in plain UTF-8.
It seems that smx is adding <META> tag to the message (I know that because I looked
at the debug output). So when I put myself a <META> in my html stating that this is
UTF-8, the message in smx contains 2 <META> (stating the same thing). Finally, when
the message is given to the mail component, these two tags are removed and not send in the
I don't really get it. Why is servicemix modifying the initial message?
I thought it should only work on the JBI wrappers... Which by the way seem absent here. See
ressources provided at the end of the mail.
And also, if the message I send is not xml-like but plain text, servicemix throw an exception
(I don't remember what it says though).
My HTTP consumer bean :
<http:consumer  service="httpMailService"
     locationURI="" />
Mail received :

Extract of the log :
10:37:49,252 | DEBUG | pool-flow.seda.servicemix-mail-thread-11 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  132 |
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@a96eba dequeued
exchange: InOut[
  id: ID:
  status: Done
  role: provider
  service: MailService
  endpoint: senderEndpoint
  in: <html>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META content="text/html;
charset=UTF-8" http-equiv="Content-Type"> </head> <body>Bonjour%2C+%0A%0AVoici+le+r%C3%A9capitulatif+de+votre+r%C3%A9serva
  out: <?xml version="1.0" encoding="UTF-8"?><ack/> ]
10:37:49,268 | DEBUG | pool-flow.seda.servicemix-mail-thread-11 |
MailComponent            | emix.common.AsyncBaseLifeCycle  561 |
Received exchange: status: Done, role: provider

View raw message