1 Reply Latest reply on May 23, 2006 5:20 PM by Jason Greene

    Content-Transfer-Encoding for Attachment.

    Jacques Militello Newbie

      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