Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
rameshkasi #1
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Subject: Api to get subscribed/unsubscribed node list
Hi,

Basically i need to do subscribe / unsubscribe to a node. Before that i should get the list of nodes with subscribed or unsubscribed status.
Is any API available in agsXmpp to get the list of subscribed nodes ?

Thanks in advance..

RameshKasi
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
PubSubManager.RequestSubscriptions() is what you are looking for.

Alex
Avatar
rameshkasi #3
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Dear Alex,

Thanks for your responds.

I'm facing a problem when i subscribe to a node. which is giving error 401 (Authentication Issue) .
How to resolve this error?

Request:
  1. <iq id="agsXMPP_5" type="set" to="pubsub.beacon.org" from="ramesh.kasimani@beacon.org/beamon"><pubsub xmlns="http://jabber.org/protocol/pubsub"><subscribe node="GroupA" jid="ramesh.kasimani@beacon.org" /></pubsub></iq>

Response:
  1. <iq xmlns="jabber:client" from="pubsub.beacon.org" to="ramesh.kasimani@beacon.org/beamon" type="error" id="agsXMPP_5"><pubsub xmlns="http://jabber.org/protocol/pubsub"><subscribe jid="ramesh.kasimani@beacon.org/beamon" node=GroupA"" /></pubsub><error code="401" type="auth"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /><not-in-roster-group xmlns="http://jabber.org/protocol/pubsub#errors" /></error></iq>

Kindly reply immediately.

Thnx
Ramesh Kasi
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Check your node configuration. It looks like the node accepts only subscriptions based on roster groups.
Are you using Pro or pubsub?

Alex
Avatar
rameshkasi #5
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Dear Alex,

Thanks!

I have created already pubsub node's and group's with openfire.And added my user name with roster group's.

Unfortunately there is no option to check the node configuration details on Openfire Admin Console.

Is it possible to discover the node details by using agsxmpp api?

Kindly advice me to proceed.


Thnx
Ramesh K
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You can request the current node confguration like described here:
http://xmpp.org/extensions/xep-0060.html#owner-configure

Alex
Avatar
rameshkasi #7
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
In reply to post #4
Subject: not-in-roster-group error while subscribing the pubsub node.
Dear Alex,

My subscribtion request has failed due to 'Roster' access model and not in one of the authorized roster groups.

How to add a user with authorized roster groups? Is there any API or IQ-request available?

Kindly advice me.


Thnx

Ramesh Kasi
Avatar
Alex #8
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by rameshkasi:
My subscribtion request has failed due to 'Roster' access model and not in one of the authorized roster groups.

How to add a user with authorized roster groups? Is there any API or IQ-request available?

agsXMPP.protocol.iq.roster.RosterManager and agsXMPP.protocol.client.PresenceManager is what you are looking for.
Please study also the examples in the MiniClient for add and subscribe contacts. When you add a contact you can choose the roster group.

Alex
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 RSS