String node = queryElement != null ? queryElement.getAttributeValue("node") : null;
// collect all the item response elements
List<Item> items = null;
try {
items = serviceCollector.processItemRequest(new InfoRequest(stanza.getFrom(), stanza.getTo(), node, stanza.getID()));
} catch (ServiceDiscoveryRequestException e) {
// the request yields an error
StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
if (stanzaErrorCondition == null) stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;
return ServerErrorResponses.getInstance().getStanzaError(stanzaErrorCondition, stanza,