Currently using smack-1.0-beta3 under linux, and I am trying to recieve IQ messages from a client application I am writing. I may be wrong but it seems that right now the only incoming query’'s that are supported have the namespaces:
jabber:iq:auth
jabber:iq:roster
jabber:iq:register
This is fine, except I am trying to read an IQ packet using my own namespace (Just trying to learn and play around with Jabber right now). From looking in the code it seems that when an IQ packet comes in, if it isn’‘t one of the mentioned namespaces it’'s query section is ignored. Am I wrong in this or is there a way for me to get the query section of unsupported namespaces?
Ok, I played with my own solution and added some code so that I could get the query string back from IQ packets that are not currently supported. This is the code I added:
In the parseIQ function of PacketReader.java, after constructing the 3 known query types, I added this else to handle unknown namespace query sections:
I seem to be talking to myself here, but just wondering if this is an “valid” solution to handling IQ packets with uknown query namespaces or is there a better, more standard, way to do this without modifying the code?
I’‘ll likely add a way to handle generic IQ packets for a future release, but it’'s not currently supported. I think your solution is a good one for now.