private void createNode(PubSubService service, IQ iq, Element childElement, Element createElement, DataForm publishOptions) {
        // Call createNodeHelper and get the node creation status.
        CreateNodeResponse response = createNodeHelper(service, iq.getFrom(), childElement.element("configure"), createElement.attributeValue("node"), publishOptions);
        if (response.newNode == null) {
            // New node creation failed
            sendErrorPacket(iq, response.creationStatus, response.pubsubError);
        } else {
            IQ reply = IQ.createResultIQ(iq);
            Node newNode = response.newNode;
            String nodeID = createElement.attributeValue("node");
            // Include new nodeID if it has changed from the original nodeID
            if (!newNode.getUniqueIdentifier().getNodeId().equals(nodeID)) {
                Element elem = reply.setChildElement("pubsub", "http://jabber.org/protocol/pubsub");
                elem.addElement("create").addAttribute("node", newNode.getUniqueIdentifier().getNodeId());
            }
            router.route(reply);
        }
    }
Retrieves published items. Should only be used for use-cases described in section "6.5 Retrieve Items from a Node"
from XEP-0060 (as opposed to processing of notifications or service discovery, which are allowed to discard payloads).
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubEngine.java