I am trying to convert ArrayList to xml using JAXB..
ArrayList myList = new ArrayList(); myList = retrieveUserAttributes.get
Try to create a class that wraps your list and make it a xml root, e.g.:
@XmlRootElement class LDAPUsers { private List<LDAPUser> users; ... get ... set ... constructor }
Then marshal LDAPUsers object.