axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Kok <>
Subject SWA encoding control
Date Tue, 02 Jan 2007 15:05:03 GMT
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();

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

Stefan Kok <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message