Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Parse custom response for default Roster IQ callback - smack

$
0
0

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.

 

RosterEntryRoster 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?


Viewing all articles
Browse latest Browse all 4979

Trending Articles