I am using the following code to get the contact list for a given user. I am not getting the list at all. The Iterator comes back empty. I used Exodus client for the same user, and I am getting the contact list correctly. What am I doing wrong?
XMPPConnection conn1 = new XMPPConnection(“localhost”);
Roster ros = conn1.getRoster();
Iterator it = ros.getGroups();
RosterGroup rgp = (RosterGroup) it.next();