Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-502

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0-M1, 3.0-M2, 3.0, 3.0.1
    • 3.0
    • servicemix-jms
    • None
    • Patch Available

    Description

      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.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--patch.txt
          3 kB
          Renaud Bruyeron

        Activity

          People

            gnodet Guillaume Nodet
            bruyeron@fullsix.com Renaud Bruyeron
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: