IQProvider problem

Hi

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’’>

g2gEZAAJYWNjb3VudF9yawAGZXJsYW5nawAGZXJsYW5nag==

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();

iq_packet.setType(IQ.Type.GET);

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

connection.sendPacket(iq_packet);

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

collector.cancel();

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 ?

Thanks

Lib

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