public void setRequestMessage(Message msg) {
String attachformat= (String)getProperty(
ATTACHMENT_ENCAPSULATION_FORMAT);
if(null != attachformat) {
Attachments attachments=msg.getAttachmentsImpl();
if(null != attachments) {
if( ATTACHMENT_ENCAPSULATION_FORMAT_MIME.equals(attachformat)) {
attachments.setSendType(Attachments.SEND_TYPE_MIME);
} else if ( ATTACHMENT_ENCAPSULATION_FORMAT_DIME.equals(attachformat)) {
attachments.setSendType(Attachments.SEND_TYPE_DIME);
}
}
}
if(null != attachmentParts && !attachmentParts.isEmpty()){
try{
Attachments attachments= msg.getAttachmentsImpl();
if(null == attachments) {
throw new RuntimeException(
Messages.getMessage("noAttachments"));
}
attachments.setAttachmentParts(attachmentParts);
}catch(AxisFault ex){
log.info(Messages.getMessage("axisFault00"), ex);
throw new RuntimeException(ex.getMessage());
}
}