dimanche 30 novembre 2014

sleekxmpp iq setting attrib to a result stanza


Vote count:

0




I want to answer a iq request with a 'result' iq. Everything's ok with iq.reply() and iq.send(), and i can build my answer with a iq.reply().setPayload(xxx).


But i also need to add some attribute to the result element of the iq.. And i couldn't find how to do this ?


I want to respond this :


<iq to='demo@im.demo.org/xxxx' id='9340:serviceTest' type='result' from='demo@im.demo.org/xanadu' xmlns='jabber:client'>

<result xmlns='urn:xmpp:test:0' ATTR1='150' ATTR2='temp'>

<payload>

xxxxxx ...


Payload is ok, but i can't create and set ATTR1 and ATTR2. (setattr, setitem, iq['result'] etc, don't work)


Thanks



asked 35 secs ago







sleekxmpp iq setting attrib to a result stanza

Aucun commentaire:

Enregistrer un commentaire