At Isode we've running code for a similar protocol which we refer to as "IQ 
Delegation" for delegation of IQs to a component.   One of the things we 
learned in doing this is that it not terribly wise to forward the delegated 
stanzas and any response stanzas to the component directly over XMPP.   Instead 
we encapsulate the delegated stanza in an IQ which requests the component to 
process that encapsulated stanza and the result of that processing then 
provided encapsulated in the response to this IQ.  This provides, we believe, 
semantical separation necessary to well implement this.  Without this 
separation, it is hard to difficult to handle arbitrary extensions and certain 
error cases.

This IQ query and result payload element uses the XEP 297 <forwarded/> for the 
encapsulation. 

-- Kurt

Reply via email to