Hi All

Using SWA to send an attachment to a server. SWA forms the message as
multipart/related. Which is all fine. But then it sends the attachment
in binary format. 

The server I am sending to will not accept any binary encoded data. So I
have to find a way to get SWA to send it across as Base64.

Below is a code snippet I of my code:

FileDataSource fileDataSource = new FileDataSource(bridge.jpg");
DataHandler dh = new DataHandler(fileDataSource);

MessageContext msgCtx = new MessageContext();
msgCtx.setEnvelope(env);

String contentType = msgCtx.addAttachment(dh);
content.addAttribute("href", contentType, nms);


-- 
Stefan Kok <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to