[jdev] GEOLOC XEP
Stephen Pendleton
spendleton at movsoftware.com
Mon Oct 16 10:30:24 CDT 2006
Hello, I am doing some implementation of the GEOLOC XEP using pubsub and I
ran into this question during implementation:
I have a special case I want to retrieve the location of myself from the
pubsub component for initialization purposes, but I do not want to subscribe
to my location since I do not want to be notified whenever my position
changes.
This use case isn't spelled out explicitly in the GEOLOC JEP, but I thought
I would use the generic pubsub capability for doing this. My thought was to
use this stanza to get the item:
<iq type='get'
from='francisco at denmark.lit/barracks'
to='pubsub.shakespeare.lit'
id='items2'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='geoloc:fransisco at denmark.lit'/>
</pubsub>
</iq>
and the pubsub component returns back:
<iq type='result'
from='pubsub.shakespeare.lit'
to='francisco at denmark.lit/barracks'
id='items2'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='geoloc:fransisco at denmark.lit'>
<item id='ae890ac52d0df67ed7cfdf51b644e901'>
<alt>1609</alt>
<lat>39.75477</lat>
<lon>-104.99768</lon>
<timestamp>2004-02-19T21:12Z</timestamp>
</item>
</items>
</pubsub>
</iq>
Does this seem like a reasonable solution?
Thank You,
Stephen
More information about the JDev
mailing list