1 Reply Latest reply on May 23, 2006 5:20 PM by jason.greene

    Content-Transfer-Encoding for Attachment.

    jacques.militello

      Hello,

      I''m trying to set the Content-Transfer-Encoding for a soap attachment to base64. I have noticed (in the class org.jboss.ws.soap.attachment.MultipartRelatedEncoder) that the code forced to set to binary :

      protected void addAttachmentParts(MimeMultipart multipart)
       throws SOAPException, MessagingException {
       ....
       mimePart.setHeader("Content-Transfer-Encoding", "binary");
       ....
       }
      


      I have changed this code to
      protected void addAttachmentParts(MimeMultipart multipart)
       throws SOAPException, MessagingException {
       ....
       if(mimePart.getHeader("Content-Transfer-Encoding") == null)
       mimePart.setHeader("Content-Transfer-Encoding", "binary");
       else
       mimePart.setHeader("Content-Transfer-Encoding", mimePart.getHeader("Content-Transfer-Encoding")[0]);
       ....
       }
       [/code]
      
      is it right ?
      
      Cheers
      


        • 1. Re: Content-Transfer-Encoding for Attachment.
          jason.greene

          Currently only binary types are supported. The reasoning is that base64 values can be inlined in the XML so there isn't much gain to a base64 encoded attachment.

          That said, if you still want this, open a feature request. You can also upload patches if you want to contribute, but you would have to add code to ensure the actual message is base64 encoded.

          -Jason