Hi,

I am trying out ServiceMix (1.0.1) and when using the Drools routing component to route messages with attachments I discovered that the CopyTransformer used in DroolsComponent (inherited from ComponentSupport) does not copy attachments between the "in" and "out" messages. See code below.

Is there any reason for this or is it a bug?

Additionaly, the transformer property of ComponentSupport is named tranformer (sic!), with access methods getTranformer and setTranformer. I assume you are aware of this, but it doesn't hurt to mention it, I hope.

From CopyTransformer:

public boolean transform(MessageExchange exchange, NormalizedMessage from, NormalizedMessage to) throws MessagingException {
       copyProperties(from, to);

       Source content = from.getContent();
if (content instanceof StreamSource && !(content instanceof StringSource)) {
           // lets avoid stream open exceptions by using a temporary format
           try {
               content = transformer.toDOMSource(from);
           }
           catch (TransformerException e) {
               throw new MessagingException(e);
           }
       }
       to.setContent(content);
       return true;
   }

/CH

_________________________________________________________________
Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/

Reply via email to