PEP protocol

hi

I’d like some help in understanding why the xml produced by OpenFire does not adhere to the specs when I publish a geoloc … I’ll let the logs speak for themselves …

Recv 1: <iq id=“53c02-2” to=“user1@satriani/Smack” type=“result”><query xmlns=“jabber:iq:roster”><item jid=“user2@satriani” name=“user2” subscription=“both”></item></query></iq>

Send 1: <iq id=“publishGeoLoc” from=“user1@satriani/Smack” type=“set”><pubsub xmlns=“http://jabber.org/protocol/pubsub”><publish node=“http://jabber.org/protocol/geoloc” ><item><geoloc xmlns=“http://jabber.org/protocol/geoloc” xml:lang=“en”><alt>1</alt><lat>1</lat><lon>1&l t;/lon></geoloc></item></publish></pubsub></iq>

Recv 1: <iq id=“publishGeoLoc” to=“user1@satriani/Smack” type=“result”></iq>

Recv 1: <message id=“http://jabber.org/protocol/geoloc__user1@satriani__XiMd5” to=“user1@satriani” from=“user1@satriani”><event xmlns=“http://jabber.org/protocol/pubsub#event”><lat>1</lat><lon>1</lon></event></message& gt;

Recv 2: <iq id=“53c02-6” to=“user2@satriani/Smack” type=“result”><query xmlns=“jabber:iq:roster”><item jid=“user1@satriani” name=“Luca” subscription=“both”></item></query></iq>

Recv 2: <presence id=“53c02-3” to=“user2@satriani/Smack” from=“user1@satriani/Smack”></presence>

Recv 1: <presence id=“53c02-7” to=“user1@satriani” from=“user2@satriani/Smack”></presence>

Recv 2: <message id=“user1@satriani__user2@satriani__kH7X3” to=“user2@satriani/Smack” from=“user1@satriani”><event xmlns=“http://jabber.org/protocol/pubsub#event”><lat>0</lat><lon>0</lon></event><x xmlns=“jabber:x:delay” stamp=“20080529T22:44:43”></x><addresses xmlns=“http://jabber.org/protocol/address”><address type=“replyto” jid=“user1@satriani/Smack”/></addresses></message>

Recv 2: <message id=“user1@satriani__user2@satriani__yQeoU” to=“user2@satriani/Smack” from=“user1@satriani”><event xmlns=“http://jabber.org/protocol/pubsub#event”><lat>1</lat><lon>1</lon></event><x xmlns=“jabber:x:delay” stamp=“20080529T23:01:32”></x><addresses xmlns=“http://jabber.org/protocol/address”><address type=“replyto” jid=“user1@satriani/Smack”/></addresses></message>

Recv 2: <message id=“user1@satriani__user2@satriani__wj9Kj” to=“user2@satriani” from=“user1@satriani”><event xmlns=“http://jabber.org/protocol/pubsub#event”><lat>1</lat><lon>1</lon></event><x xmlns=“jabber:x:delay” stamp=“20080529T23:01:32” from=“satriani”></x></message>

user2 logs in after user1 has logged in and published its geoloc …

as you can see the Recv 2 gets notified of a geoloc but the geoloc element has been taken out of the update event for some reason … here is the the specs …

http://www.xmpp.org/extensions/xep-0080.html#usecases-pubsub

further more … user2 gets notified three times. first timeround with stale values … then both user2@satriani and user2@satriani/Smack get the the new values … both ? why ?

how am i supposed to parse the geoloc element if it’s not there ? what about the x element ?

thanks in advance …

luka

It’s me again,

I’ve run the example above with the PSI XML console and it’s fine, the response is what you’d expect. Why the dicrepancy then ?

thanks

Hey Prophet,

I would say that this is a problem in Smack. Smack is incorrectly parsing the XML or is incorrectly printing it.

Regards,

– Gato