ci-dessous montré que je suggère publiais au noeud appeler « ghost2 »PubSub publier au noeud succès, récupérer à partir du nœud échec
iq id="kB8dk-0" to="computer/2c10ee6b" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>[email protected]/Smack</jid></bind></iq>
<iq id="kB8dk-1" to="[email protected]/Smack" type="result"></iq>
<iq id="kB8dk-2" to="[email protected]/Smack" type="result"><query xmlns="jabber:iq:roster"><item jid="test" name="test" subscription="none"></item><item jid="[email protected]" subscription="from"></item></query></iq>
<message id="[email protected][email protected]__ChWrY" to="[email protected]" from="[email protected]"><event xmlns='http://jabber.org/protocol/pubsub#event'><items node='null'><item id='ghost2'/></items></event></message>
<iq id="kB8dk-4" to="[email protected]/Smack" from="computer" type="result"></iq>
<iq id="kB8dk-5" to="[email protected]/Smack" from="computer" type="result"></iq>
<message id="[email protected]__DGaLS" to="[email protected]" from="[email protected]"><event xmlns='http://jabber.org/protocol/pubsub#event'><items node='ghost2'><item id='testid2'><book xmlns="pubsub:test:book"><title>book x</title></book></item></items></event></message>
mais lorsque je tente de subsript et récupérer du même nœud, je reçois une erreur 404
<iq id="zpWDI-0" to="computer/b7fe68a8" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>[email protected]/Smack</jid></bind></iq>
<iq id="zpWDI-1" to="[email protected]/Smack" type="result"></iq>
<iq id="zpWDI-2" to="[email protected]/Smack" type="result"><query xmlns="jabber:iq:roster"><item jid="[email protected]" name="test" subscription="to"><group>Friends</group></item><item jid="test" name="test" subscription="none"></item></query></iq>
<presence id="kB8dk-3" to="[email protected]/Smack" from="[email protected]/Smack"></presence>
<message id="[email protected][email protected]__tAVfB" to="[email protected]/Smack" from="[email protected]"><event xmlns='http://jabber.org/protocol/pubsub#event'><items node='TestNode2323'><item id='2Ke42PVQ77iSCP0'><book xmlns="pubsub:test:book"><title>book x</title></book></item></items></event><x xmlns="jabber:x:delay" stamp="20091013T14:16:32"></x><addresses xmlns="http://jabber.org/protocol/address"><address type="replyto" jid="[email protected]/god"/></addresses></message>
<iq id="zpWDI-4" to="[email protected]/Smack" from="computer" type="error"><query xmlns="http://jabber.org/protocol/disco#info" node="ghost2"></query><error code="404" type="CANCEL"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
Je pensais que vous pourriez avoir supprimé certains messages pour une meilleure lisibilité, par exemple comme vous vouliez dire, ils ne sont pas liés. Mais comme mentionné dans un commentaire à votre dernière question: Quelle bibliothèque utilisez-vous pour pubsub? J'utilise aussi pubsub, mais je n'ai jamais eu à me soucier des messages bruts. – sfussenegger
en utilisant smackx pubsub. toi? – cometta
aussi, à partir de la réponse, le "livre x" provient du nœud "TestNode2323" .. pouvez-vous commenter? – cometta