DataHandler h = new DataHandler(new ByteArrayDataSource(bytes, "base64"));
choice.setPayload(h);
req.setAddRequestChoice_type0(choice);
// add the TAS metadata
AttachmentMetadata meta = new AttachmentMetadata();
meta.setFilename(fileName);
meta.setMimeType(mimetype);
req.setAttachmentMetadata(meta);
// add TAS credentials
AuthCredentials cred = new AuthCredentials();
AuthorizedRoles_type0 roles = new AuthorizedRoles_type0();