// error condition 1 (6.1.3)
return errorStanzaGenerator.generateJIDDontMatchErrorStanza(sender, serverJID, stanza);
}
String nodeName = extractNodeName(stanza);
LeafNode node = root.find(nodeName);
if (node == null) {
// no such node (error condition 11 (6.1.3))
return errorStanzaGenerator.generateNoNodeErrorStanza(sender, serverJID, stanza);
}
String id = idGenerator.create();
node.subscribe(id, subJID);
buildSuccessStanza(sb, nodeName, strSubJID, id);
sb.endInnerElement(); // pubsub
return new IQStanza(sb.build());