Pubsub/Smack/Smackx & multiple subscriptions

Skip to first unread message

Martin Hewitt

Oct 19, 2010, 11:21:34 AM10/19/10
Hi group,

I'm trying to run multiple search term subscriptions over one XMPP
connection to Collecta. In order to unsubscribe from terms no longer
required, I need to get at the subid of the IQ subscription. Using
plain Smack I couldn't seem to get at that particular value, which was
frustrating, so I've turned to the new pubsub extension for Smack.

The problem with this is that, although it abstracts the
subscribe/unsubscribe actions, its base element is the Node, and when
I try and find the search Node, I get feature-not-implemented(501)
from the <query> element in:

<iq id="8iPRl-3" to="" type="get"><query

Now, I'd love to simply be able to pluck out the subid field from the
IQ response, so the ideal solution would be that, if anyone has any
ideas? Failing that, will <query> be implemented on Collecta's side?



Christopher Zorn

Oct 19, 2010, 1:55:14 PM10/19/10
You should get the subid in the returned iq from the subscription. I do not know much about smack so but whatever the object representing the iq should have the subid in the returned attributes. /iq/pubsub/subscription[@subid] is the appropriate path. 

Collecta supports retrival of subscriptions. Please see the following URLs:

Martin Hewitt

Oct 19, 2010, 5:42:21 PM10/19/10
Thanks for the reply Christopher.

It turns out that updating smack to the latest nightly build adds in a
pubsub library to the standard smack/smackx package. This has the
side-effect of more finely typing the response from the IQ request -
it becomes a Pubsub typed Packet so one can then get the subid in a
formalised, typed fashion.


Reply all
Reply to author
0 new messages