Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Openfire PubSub node item list empty after item publication

$
0
0

Hi all

 

I want to query the item list from my pubsub node.

 

First:

 

I publish a content to the node:

 

<iq id="8:pubsubpublishnode" from="admin@myOpenfireServer/aeea18b3" to="pubsub.myOpenfireServer" type="set" xmlns="jabber:client">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="mainnode" jid="admin@myOpenfireServer/aeea18b3">

<item>

<entry xmlns="http://www.w3.org/2005/Atom">

<src>test5</src>

<updated>2015-08-18T17:41:01.410Z</updated>
</entry>
</item>
</publish>
</pubsub>
</iq>

 

 

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:

 

 

<iqid="9:subscribenode"from="admin@myOpenfireServer/aeea18b3"to="pubsub.myOpenfireServer"type="set"xmlns="jabber:client">

<pubsubxmlns="http://jabber.org/protocol/pubsub">

<subscribenode="mainnode"jid="admin@myOpenfireServer/aeea18b3"></subscribe>

</pubsub>

</iq>

 

The response:

 

 

<iqid="9:subscribenode"xmlns="jabber:client"type="result"from="pubsub.myOpenfireServer"to="admin@myOpenfireServer/aeea18b3">

<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:

 

 

<messageid="mainnode__admin@myOpenfireServer__4cyVr"xmlns="jabber:client"from="pubsub.myOpenfireServer"to="admin@myOpenfireServer/aeea18b3">

<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>

</entry>

</item>

</items>

</event>

 

<delayxmlns="urn:xmpp:delay"stamp="2015-08-18T17:52:08.054Z"></delay>

 

</message>

 

Third:

 

Then I query the published items in node:

 

 

<iqid="items1"from="admin@myOpenfireServer/aeea18b3"to="pubsub.myOpenfireServer"type="get"xmlns="jabber:client">

<queryxmlns="http://jabber.org/protocol/disco#items"node="mainnode"></query>

</iq>

 

The result is:

 

<iqid="items1"xmlns="jabber:client"type="result"from="pubsub.myOpenfireServer"to="admin@myOpenfireServer/aeea18b3">

<queryxmlns="http://jabber.org/protocol/disco#items"node="mainnode"></query>

</iq>
UPDATE:
I try out to send request from the examples of XEP-0060 with a new node:<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>
After publishing an item to this node, the item list still empty:
<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?

 

 


Viewing all articles
Browse latest Browse all 4979

Trending Articles