Hello All,
I am having problems with searching using Smack. I am trying to search using a certain gateway (“tlen”) and, while it does work using Psi, it fails completely when I’'m doing it with Smack.
Here’'s the troubling little piece of code:
final XMPPConnection connection = messenger.getConnection();
final UserSearchManager search = new UserSearchManager(connection);
final String service = “tlen.” + connection.getServiceName();
try
{
final Form queryForm = search.getSearchForm(service);
final Form searchForm = queryForm.createAnswerForm();
//
// setting the form fields…
// I’'ve cut that out to make this shorter
//
SmackConfiguration.setPacketReplyTimeout(60000);
final ReportedData reportedData = search.getSearchResults(searchForm, service);
//
// reportedData is null !!
// WHY?
//
}
catch (XMPPException e)
{
e.printStackTrace();
}
So… reportedData is null.
On the debugger it looks like this:
This is what I’'m sending:
BUT on the Raw Received Packets there are some answers:
So… the basic question is, if I am doing anything wrong?