Base64Binary binaryData = attachmentRequest.getBinaryData();
DataHandler dataHandler = binaryData.getBase64Binary();
File file = new File(
attachmentRequest.getFileName());
FileOutputStream fileOutputStream = new FileOutputStream(file);
dataHandler.writeTo(fileOutputStream);
fileOutputStream.flush();
fileOutputStream.close();
AttachmentResponse response = new AttachmentResponse();
response.setAttachmentResponse("File saved succesfully.");