WebSphere Application Server - Mime Header: Content-Transfer-Encoding

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > April 2005 > Mime Header: Content-Transfer-Encoding





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Mime Header: Content-Transfer-Encoding

2005-04-19, 8:02 am

We are trying to change the Content-Transfer-Encoding value to 8bit in the MIME header for an attachment being sent with a SOAP message. However using the following sample code always results in the Content-transfer-Encoding value being 'binary':
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage message = messageFactory.createMessage();
AttachmentPart ap1 = message.createAttachmentPart();
ap1.setContentId("NewContentIDSet");
ap1.setContentLocation("NewContentLocation");
ap1.setContent("Content-Transfer-Encoding","8bit");
ap1.setContent("hello world", "text/application");
message.addAttachmentPart(ap1);
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader header = envelope.getHeader();
SOAPBody body = envelope.getBody();
header.detachNode();
//Save the message
message.saveChanges();
message.writeTo(System.out);


Any help would be much appreciated.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com