Hi all
I want to query the item list from my pubsub node.
First:
I publish a content to the node:
<item>
<entry xmlns="http://www.w3.org/2005/Atom">
<src>test5</src>
The response:
<iqid="8:pubsubpublishnode"xmlns="jabber:client"type="result"from="pubsub.myOpenfireServer"to="admin@myOpenfireServer/aeea18b3"></iq>
I didn't receive item id.
Second:
If I subscribe the node:
<pubsubxmlns="http://jabber.org/protocol/pubsub">
<subscribenode="mainnode"jid="admin@myOpenfireServer/aeea18b3"></subscribe>
</iq>
The response:
<pubsubxmlns="http://jabber.org/protocol/pubsub">
<subscriptionnode="mainnode"jid="admin@myOpenfireServer/aeea18b3"subid="5uCD9Jgogvth1GgVLvqbPfLhzLU5qAJnDlHgnuFB"subscription="subscribed">
<subscribe-options></subscribe-options>
</subscription>
</pubsub>
</iq>
I get the last published item in the next message:
<eventxmlns="http://jabber.org/protocol/pubsub#event">
<itemsnode="mainnode">
<itemid="c34620b3-c8e3-4c34-88ee-8caa5a51fb9b6">
<entryxmlns="http://www.w3.org/2005/Atom">
<test>feedtest</test>
<updated>2015-08-18T17:52:11.423Z</updated>
</item>
</items>
</event>
</message>
Third:
Then I query the published items in node:
<queryxmlns="http://jabber.org/protocol/disco#items"node="mainnode"></query>
The result is:
<queryxmlns="http://jabber.org/protocol/disco#items"node="mainnode"></query>
<iq from='admin@
myOpenfireServer/508973af' to='pubsub.myOpenfireServer' type='get' xmlns='jabber:client' id='10:sendIQ'
><pubsub xmlns='http://jabber.org/protocol/pubsub'><items node='testnode'/></pubsub></iq>
<iq xmlns="jabber:client" type="result"
id="10:sendIQ" from="pubsub.myOpenfireServer
" to="admin@myOpenfireServer
/508973af"><pubsub xmlns
="http://jabber.org/protocol/pubsub"><items node="testnode"/></pubsub></iq>
But the node publish event received.
My First question is why I didn't get an item id after I publish an item? I have to manually give an id?
Second: There is an automatic generated item id at the node notify. So there is an item id anyway?
Third: Why not appear the published content in the node item list query, when i get a notify about the content with the payload?