AnsweredAssumed Answered

Parse custom response for default Roster IQ callback - smack

Question asked by Mani on Jun 24, 2016
Latest reply on Jun 25, 2016 by Flow

I have an idea to get the roster with VCard for profile related information.

I have customized the Roster response as like below,

IQ request:

<iq type="get" id="ab2aa">

<query xmlns="jabber:iq:roster"/>

</iq>

IQ Response:

<iq from="dpvmani@localhost" type="result" to="dpvmani@localhost" id="ab2aa">
<query xmlns="jabber:iq:roster">
<item subscription="from" name="test-user1" jid="test-user@localhost">
     <profile>
          <vCard xmlns="vcard-temp">
               <FN>Gopi</FN>
         </vCard>
    </profile>
</item>
</query>
</iq>

 

I can able to get the name and jid from the RosterEntry but not able to get the vCard.

 

RosterEntry Roster roster = Roster.getInstanceFor(connection);
Collection<RosterEntry> entries = roster.getEntries();
for (RosterEntry entry : entries) {
System.out.println(entry);//I would like to get the vCard information from here
}

 

Can any one give me the idea about this?

Outcomes