I’‘m trying to pull down a list of available conference rooms but I can’'t seem to get a hold of the information that I need via smack.
This is the packet that I’'m sending to the server:
Packet packet = new Packet() {
public String toXML() {
return “<iq type=’‘get’’ to=’’” +
connection.PUBLICCONFERENCE +
“’’><query xmlns=’‘jabber:iq:browse’’/>”;
}
};
This is a closed system so I don’'t need to discover the name of the conference component. I know it will always be represented by PUBLICCONFERENCE(in my extended XMPPConnection class).
Here’'s the debug response:
<iq type=’‘result to=’‘myuser@server.com/resource’’ from=’‘conference.myserver.com’’><conference xmlns=’‘jabber:iq:browse’’ type=’‘public’’ name=’‘Conferencing Service’’><conference type=’‘public’’ jid=’‘someroom@conference.myserver.com’’ name=’’ (1)’’/>
The filter that I use to catch the response:
//PacketFilter to collect IQ packets from conference module
PacketFilter filter = new AndFilter(new PacketTypeFilter(IQ.class),
new PacketFilter() {
public boolean accept(Packet packet) {
IQ iq = (IQ)packet;
if(iq.getType() == IQ.Type.RESULT && (iq.getFrom() != null)) {
if(iq.getFrom().equalsIgnoreCase(connection.PUBLICCONFERENCE)) {
return true;
}
else { return false; }
}
else { return false; }
}
});
connection.addPacketListener(this,filter);
The problem is that smack seems only to show me part of the actual packet. When I catch the response and do:
IQ iqPacket = (IQ)packet;
System.out.println("XML: " + iqPacket.toXML() + “\n”);
I get:
XML:
So, how do I go about getting the portion between ? Isn’'t all contained in a single packet?
Thanks in advance.