{
atts = new JavaMailAttachments();
message.setAttachments(atts);
}
OutMessageDataSource source = new OutMessageDataSource(context, message);
DataHandler soapHandler = new DataHandler(source);
atts.setSoapContentType(HttpChannel.getSoapMimeType(message, false));
atts.setSoapMessage(new SimpleAttachment(source.getName(), soapHandler));
response.setContentType(atts.getContentType());
out = new BufferedOutputStream(response.getOutputStream());
atts.write(out);
source.dispose();
}
else
{
response.setContentType(doGetSoapMimeType(message, true));