Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
kc #1
Member since Apr 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: PubSubManager Unsubscribe
Hi,

I am trying to figure out how to set the subid in an unsubscribe iq via the PubSubmanager. Am wondering is that possible?

Thanks in advance.

Best Regards,
KC
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I don't understand your question.
What do you mean with subid? Please elaborate.
Alexander Gnauck
AG-Software
Avatar
kc #3
Member since Apr 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
In the XEP-0060 specifications, it states

6.2.3.1 No Subscription ID

If the requesting entity has multiple subscriptions to the node but does not specify a subscription ID, the service MUST return a <bad-request/> error, which SHOULD also include a pubsub-specific error condition of <subid-required/>.

Example 50. Entity did not specify SubID

<iq type='error'
    from='pubsub.shakespeare.lit'
    to='francisco@denmark.lit/barracks'
    id='unsub1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
     <unsubscribe node='princely_musings' jid='francisco@denmark.lit'/>
  </pubsub>
  <error type='modify'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <subid-required xmlns='http://jabber.org/protocol/pubsub#errors'/>
  </error>
</iq>

I am getting this error with the unsubscribe call using the PubSubManager. If I manually edit the iq to include in the subid as follows, it will work.
<iq type='set'
    from='francisco@denmark.lit/barracks'
    to='pubsub.shakespeare.lit'
    id='unsub1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
     <unsubscribe
         node='princely_musings'
         jid='francisco@denmark.lit'
         subid="aijk12543#2"/>
  </pubsub>
</iq>

Is there any easy way to do this via the PubSubManager?

Thanks
This post was edited on 2008-04-29, 00:58 by kc.
Avatar
Alex #4
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no, this is not possible with the PubSubManager. You would have to create the stanza yourself.
We can add this to the PubSubManager for the next release when requested.

Alex
Alexander Gnauck
AG-Software
Avatar
Alex #5
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
added, new code is in SVN
Alexander Gnauck
AG-Software
Avatar
kc #6
Member since Apr 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Many thanks for the fast response and additional code.

Cheers,
KC
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP SDK Support RSS