*ProviderProcessor in servicemix-jms overwrites the MimeMessage content-type 
with the one from the incoming normalizedmessage
-----------------------------------------------------------------------------------------------------------------------------

                 Key: SM-502
                 URL: https://issues.apache.org/activemq/browse/SM-502
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-jms
    Affects Versions: 3.0-M1, 3.0-M2, 3.0-M3, 3.0
            Reporter: Renaud Bruyeron
             Fix For: 3.0
         Attachments: patch.txt

The problem (MultiplexingProviderProcessor in servicemix-jms):
        Message msg = session.createTextMessage(baos.toString());
        msg.setStringProperty("Content-Type", writer.getContentType());
        Map headers = (Map) nm.getProperty(JbiConstants.PROTOCOL_HEADERS);
        if (headers != null) {
            for (Iterator it = headers.keySet().iterator(); it.hasNext();) {
                String name = (String) it.next();
                String value = (String) headers.get(name);
                msg.setStringProperty(name, value);
            }
        }

This means that any Content-Type header in the PROTOCOL_HEADERS will overwrite 
the one set line 176.
The problem manifests itself when sending a SAAJ (SOAP with attachments) 
request into an http:endpoint proxying a jms:endpoint provider endpoint. In the 
resulting JMS message, the content-type is the original content-type but it 
should be the new content-type computed by the SoapWriter: this bug renders the 
JMS message content unusable.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to