you can use below API to get the attachment of WTDocument.
WTDocument document=null;
QueryResult attachments = ContentHelper.service.getContentsByRole(document, ContentRoleType.SECONDARY);
while (attachments.hasMoreElements()) {
ApplicationData appData = (ApplicationData) attachments.nextElement();
// String url = ContentHelper.getDownloadURL(document, appData).toString();
}
Hope this helps !!
Thanks,
Shreyas