AnsweredAssumed Answered

Invalid Affliation in pubsubManager.getAffliations (Smack API in Android)

Question asked by Sai Sarath on Sep 16, 2016
Latest reply on Oct 3, 2016 by Flow

I am trying to do the following code

List<Affiliation> affiliationsList = manager.getAffiliations();

which is sending a request to my open fire server as follows

<iq to='pubsub.sais-macbook-pro.local' id='9X81t-14' type='get'><pubsub xmlns='http://jabber.org/protocol/pubsub'><affiliations/></pubsub></iq>

which receives the following data

<a xmlns='urn:xmpp:sm:3' h='5' /> <iq type="result" id="9X81t-14" from="pubsub.sais-macbook-pro.local" to="user0@sais-macbook-pro.local/6tyhnt9dxr"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <affiliations> <affiliation node="hdhdg1474044716939" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="hdhd1474044676441" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="jsjs" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="hgfd1474045979829" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="uwdufh1474045089964" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="hhwvhx1474085208255" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="ha1474044753958" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="ritoyo1474045127829" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="ywhdidj1474056356469" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="group1" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="uwdufh1474044961580" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="usvejdkf1474056459160" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="jdhd1474044097034" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="uwbdf1474046301414" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="idbedux1474049957303" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="iwndd" jid="user0@sais-macbook-pro.local" affiliation="owner" /> <affiliation node="inbg1474046072053" jid="user0@sais-macbook-pro.local" affiliation="owner" /> </affiliations> </pubsub>

and follows by an ERROR/EXCEPTION:

W/AbstractXMPPConnection: Connection XMPPTCPConnection[user0@sais-macbook-pro.local/1940rxqu6u]
  
(0) closed with error
org
.jivesoftware.smack.SmackException: Invalid affiliation
org
.jivesoftware.smackx.pubsub.provider.AffiliationProvider.parse(AffiliationProvider.java:56)
  at org
.jivesoftware.smackx.pubsub.provider.AffiliationProvider.parse(AffiliationProvider.java:33)
  at org
.jivesoftware.smack.provider.Provider.parse(Provider.java:31)
  at org
.jivesoftware.smack.util.PacketParserUtils.parseExtensionElement(PacketParserUtils.java:917)
  at org
.jivesoftware.smack.util.PacketParserUtils.addExtensionElement(PacketParserUtils.java:1037)
  at org
.jivesoftware.smack.util.PacketParserUtils.addExtensionElement(PacketParserUtils.java:1031)

Outcomes