Problems implementing Roster

I am currently having problems creating and sharing the roster.

Does anyone know of any good examples of setting up a simple roster?

I am able to set up groups, and add an entry, but this is only to the roster of the client creating the entry.

How do I add an entry to another clients roster?

you cant. thats up to the other client to change its own roster

So each client has to add the users to the roster!

Is there any way then, to get all the usernames from jabberd2 server using smack?

you can do a search using disco

What is Disco?

when i said disco I meant jabber:iq:search and I am not sure if jabberd2 implements it but you can look it up using disco, or service discovery. You can look both these up in the jeps.