Hi,
Thanks for the information.
Below is my code
//code
Roster roster = getRoster(HttpSession);
List rosterList = new ArrayList();
Iterator rosterEntries = roster.getEntries();
if(roster != null)
{
System.out.println("The roster count is " + roster.getEntryCount());
if (roster.getEntryCount() > 0)
{
Iterator i=roster.getEntries();
while(i.hasNext())
{
RosterEntry rosterEntry = (RosterEntry)i.next();
if(rosterEntry != null)
{
String rosterUser = rosterEntry.getUser();
System.out.println("Roster Entry User is " + rosterUser);
Presence presence = roster.getPresence(rosterUser);
if(presence != null){
System.out.println("The value of presence is " + presence);
System.out.println("The presence getStatus is " + presence.getStatus());
}
else
{
System.out.println(“Presence is NULL”);
}
}
else
{
System.out.println(“Roster Entry is NULL”);
}
}
} else {
System.out.println(“The roster is EMPTY”);
}
} else {
System.out.println(“Roster is NULL”);
}
//.
output for the above code is
The roster count is 3
Roster Entry User is banu@localhost
Presence is NULL
Roster Entry User is selvi@localhost
Presence is NULL
Roster Entry User is progen@localhost
Presence is NULL
I am not getting the roster from connection.
I dont know what do you mean by subscribing the presence.
I checked that My roster subscription is default to Accept_All.
Also i tried it using Thread.sleep(5000) . it is not giving me the results.
I need it in urgent…Please Help me…
Thanks for your Help.
Thnaks
banu