powered by Jive Software

Custom IQ type never making it to other clients, bounces off of server


I’‘m using Smack 3.0.0 beta 1 and I’‘ve come across something that I need some help with. I’'m trying to send an IQ get message from one client to another so I have

but for some reason the IQ never makes it to the other client and I just get an error response back with a 503 service-unavailable error code.

I’‘ve looked at http://www.igniterealtime.org/forum/thread.jspa?messageID=140310&#140310 but it wasn’'t helpful as I was already extending the IQ class with my own custom one.

Other things that I did are:

  • ProviderManager.getInstance().addIQProvider(“query”, “http://mynamespacehere.com”, new MyProvider());

  • connection.addPacketListener(new MyPacketListener(), new MyPacketFilter());

If anyone has any ideas I’'d love to hear them.

Hi Geoff,

When you say that the IQ never makes it to the other client are you saying that you don’'t see the packet in the Smack debugger (XMPPConnection.DEBUG_ENABLED = true;)?



You have to specify the full jid (that includes the resource: foo@bar/baz) as the to-address, since otherwise the iq-packet will be handled by the server.

Good catch Andreas.

Worked beautifully. Thanks a lot!