// Send the disco packet to the server itself
try {
DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection)
.discoverInfo(serviceName);
// Check if the server supports JEP-33
if (info.containsFeature("http://jabber.org/protocol/address")) {
serviceAddress = serviceName;
}
else {
// Get the disco items and send the disco packet to each server item
DiscoverItems items = ServiceDiscoveryManager.getInstanceFor(connection)