powered by Jive Software

How could I transfer a custom IQ via openfire?

Hi guys:

when I send a custom IQ to someone, I got a

error code=“503” type=“cancel”><service-unavailable xmlns="urn:ietf:params:x…

from openfire. It is clear because openfire don’t know how to handle it.

IQhandler of openfire will works I think.

but the only thing I want to do is just send an IQ packet to the target client so I can return result IQ from the client.

in other words, openfire do not need to handle it, just pass it will be fine.

so my question is : How could I prevent openfire from blocking my custom IQ without developing an IQhandler plugin?

or, did I get an misunderstanding of using IQ? or an plugin is a must have for this situation?

any kind answer or help is welcome!

from openfire. It is clear because openfire don’t know how to handle it.
No, openfire is completly agnostic to the content of IQs that are not directed to openfire itself. The service-unavailable error is usually send by xmpp entities if they don’t know how to handle the IQ. Please show use the full IQ get/set stanza and the full IQ responise error stanza.

in other words, openfire do not need to handle it, just pass it will be fine.
That is already the case.

Hi Flow

Thank you so much to show me the right way!

it’s so good that I don’t need to open another project : )

here is my get IQ and Error IQ.

GETP

GETP

is there anything suspicious in the stanza? I missed the from and xmlns attributes in first iq, is that the problem?

whats weird is the error iq seems come directly from the server because the client didn’t receive anything, and the error IQ is just the same after I disconnect the "test@mobilevisionart.com" client.

I am still digging in and checking the code… see what i can find…

is there anything suspicious in the stanza?

Yes, you send it to a bare JID, which means the server is required to handle it (see rfc6121 8.5.2.1.3), whereas you likely would want to send it to a full JID.

hi Flow

You are awesome! ( 8.5.2.1.3… it really shocks me…)

It works all good now. Thank you for the kind help!