Searching Users


Could anyone help me figure out how to send valid search queries to widlfire servers? I am using Smack 2.2.1 and the code sample in the javadoc documentation seems to be out to date.

On the other hand I tried doing the following:

UserSearchManager search = new UserSearchManager(getXMPPConnection());

Form searchForm = search.getSearchForm(“search.localwidlfire”);

Form answerForm = searchForm.createAnswerForm();

Iterator it=attributes.keySet().iterator();


String next=(String);

String value=(String)attributes.get(next);

answerForm.setAnswer(next, value);


ReportedData result=search.getSearchResults(answerForm,“search.localwidlfire”);


Obviously it does not work. My attribute map contains the keys “Name” and “Username”. If you can post some sample code of how to do such a search, I would be very happy.