// collect all the info response elements
List<InfoElement> elements = null;
try {
if (isServerInfoRequest) {
elements = serviceCollector.processServerInfoRequest(new InfoRequest(stanza.getFrom(), to, node, stanza.getID()));
} else if (isComponentInfoRequest) {
elements = serviceCollector.processComponentInfoRequest(new InfoRequest(stanza.getFrom(), to, node, stanza.getID()));
} else {
elements = serviceCollector.processInfoRequest(new InfoRequest(stanza.getFrom(), to, node, stanza.getID()));
}
} catch (ServiceDiscoveryRequestException e) {
// the request yields an error
StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
if (stanzaErrorCondition == null) stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;