Here's what I did to fix it..

 

XsltComponent:

 

private boolean copyProperties;

 

public boolean isCopyProperties() {

      return copyProperties;

}

 

public void setCopyProperties(boolean copyProperties) {

    this.copyProperties = copyProperties;

}

 

protected boolean transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws MessagingException {

    try {

        Transformer transformer = createTransformer(exchange, in);

        ...

        out.setContent(new StringSource(xml));

       

        if (copyProperties) {

            for (Iterator iter = in.getPropertyNames().iterator(); iter.hasNext();) {

                String name = (String) iter.next();

                Object value = in.getProperty(name);                   

                out.setProperty(name, value);

            }

        }

       

        ...

}

 


From: Schweter, Ryan
Sent: Tuesday, August 30, 2005 10:12 PM
To: [email protected]
Subject: [servicemix-user] XSLT Transforms "Strip" Properties

 

When one transforms an xml message, the inbound properties are not copied over to the outbound message.  If it’s the intent to not do so by default, I think there should be an option to allow for it.

 

Thoughts?

 

 

_____________________________________________________
|\| R Y A N  S C H W E T E R                      |\|
|/|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯                |/|
|\| developer                                      \|
|/| IT Application Delivery
|\| .: 512.742.7875
|/| .:
[EMAIL PROTECTED]
|\|
¯¯¯

 

Reply via email to