[JDEV] Using JabberCOM to set private data on the server
Richard Clippard
rclippard at ena.com
Thu Aug 8 15:10:19 CDT 2002
Does anyone know how to store private data on the server using JabberCOM?
IJabberIQ *jabberIQ = (IJabberIQ*)Session.CreateIQ();
jabberIQ->iqType = "set";
jabberIQ->ID = "1001";
jabberIQ->NameSpace = "jabber:iq:private";
jabberIQ->SetField("thing", "False");
Session.SendIQ((struct IDispatch **)&jabberIQ); // not sure why I have to cast
This returns an error
SEND: <iq type="set" id="1001"><query xmlns="jabber:iq:private"><thing>False</thing></query></iq>
RECV: <iq type='error' id='1001' from='jabberClient at jabberTest.com/Jabber Client' to='jabberClient at jabberTest.com/Jabber Client'><query xmlns='jabber:iq:private'><thing>False</thing></query><error code='406'>Not Acceptable</error></iq>
It seems to be missing the <JabberClient xmlns="JabberClient:prefs">...</JabberClient> part around the values I want to store but I cannot figure out how to set it via JabberCOM.
I was trying to send something like:
SEND: <iq type="set" id="1001"><query xmlns="jabber:iq:private"><AlertManager xmlns="JabberClient:prefs"><thing>False</thing><JabberClient></query></iq>
More information about the JDev
mailing list