I am trying to get user email listing from my domain.
Ok. This is how I do it (code snippet):
UserService userService = new UserService("ProvisioningApiClient");
userService.setOAuth2Credentials(credential);
userService.useSsl();
UserFeed userFeed = userService.getFeed(url, UserFeed.class);
for (UserEntry userEntry : userFeed.getEntries()) {
logger.warning(userEntry.getEmail().toString());
}
The logger will throw NullPointerException error. But when I tried with userEntry.getTitle.getPlainText(), the name is shown.
Is there anything that I missed?