Hey xiangzhaozeng,
In XMPP a client should not be able to ask the server for the list of registered users. That would be a huge security breach. Adding someone to your roster is a way to keep track of the presence of your contacts. As you noticed you need to know the JID (i.e. address) of the user to add him to your roster.
If your goal is to populate rosters with list of users on the server then you should take a look at shared groups. You can define a group with all the users in the system and configure it to be public so that all clients will see that group and its members.
There is also an ad-hoc command that admins may send to the server to get information about users in the system.
Regards,
-- Gato