I am trying to use the latest Smackx trunk to receive and then subscribe to a pubsub node. However, openfire just sends me back the error: item not found (404).
I am creating Java objects from ColdFusion, so my code snippets may look funny, but maybe someone can tell me what I forgot.
This is how I create node:
ftype = createObject("java", "org.jivesoftware.smackx.pubsub.FormType");
cform = createObject("java", "org.jivesoftware.smackx.pubsub.ConfigureForm").init(ftype.submit);
cform.setPersistentItems(true);
cform.setDeliverPayloads(true);
caccess = createObject("java", "org.jivesoftware.smackx.pubsub.AccessModel");
cform.setAccessModel(caccess.open);
cpublish = createObject("java", "org.jivesoftware.smackx.pubsub.PublishModel");
cform.setPublishModel(cpublish.open);
cform.setMaxItems(99);
manager = createObject("java", "org.jivesoftware.smackx.pubsub.PubSubManager").init(XMPPConnection);
myNode = manager.createNode("subber", cform);
And this is how I try to get to it (in another section of the code):
manager = createObject("java", "org.jivesoftware.smackx.pubsub.PubSubManager").init(XMPPConnection);
myNode = manager.getNode("subber");
Right after creating the node, I seem to be able to publish it like this:
payload = createObject("java", "org.jivesoftware.smackx.pubsub.SimplePayload").init("book","pubsub:test:book","<book xmlns='pubsub:test:book'><title>Lord of the Rings</title></book>");
item = createObject("java", "org.jivesoftware.smackx.pubsub.Item").init(payload);
myNode.publish(item);
However, calling getNode () causes my code to fail.
I verified that the nodes are created by checking the database used by my openfire server. I can see them there, properly attributed as leaf nodes, etc.
?
- - XMPP ColdFusion?
, CF Smack, pubsub:)
!