powered by Jive Software

IQProvider problem


I’'m trying to add an IQProvider for IQ packets that look like this :

<iq from=’‘erlang@localhost’’ to=’‘erlang@localhost/Sanctuaire’’ id=’‘YrH9I-4’’ type=’‘result’’>

<query xmlns=’‘sanctuaire:iq’’>


I added the provider using the addIQProvider method :

ProviderManager.addIQProvider(“query”, “santuaire:iq”, SanctuaireIQPacket.class);

The SanctuaireIQPacket class derives from the IQ class, and implements the setBase64(String) method (plus getChildElementXML, etc.)

To send and receive such packets, I do :

SanctuaireIQPacket iq_packet = new SanctuaireIQPacket();


PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(iq_packet.getPacketID()));


IQ response = (IQ) collector.nextResult(SmackConfiguration.getPacketReplyTimeout());


The “get” packet is well formed and treated correctly by the server, which replies with a result packet exactly like the one above (checked with the debugger). But the “response” instance I retrieve contains only the element :

What am I missing ?



Okay, I don’‘t know exactly what I’'ve done all this time (changed the SanctuaireIQPacket constructor mainly + many hours of trial/error) but now it works perfectly…

Message was edited by:

The Librarian