【发布时间】:2014-12-04 05:57:10
【问题描述】:
我尝试使用 iq 方法使用 strophe.js,我可以获取在线用户数,但我无法从我的 Openfire 3.9.3 服务器获取在线用户列表。
XMPP 请求正文:
<iq from='admin@localhost/7adf302e' to='admin@localhost' type='set' xml:lang='en' xmlns='jabber:client' id='6816:sendIQ'>
<command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#get-online-users-list' />
</iq>
XMPP 响应
<iq xmlns="jabber:client" type="error" id="6816:sendIQ" from="admin@localhost" to="admin@localhost/7adf302e">
<command xmlns="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#get-online-users-list"/>
<error code="404" type="cancel">
<item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
参考: http://xmpp.org/extensions/xep-0133.html#get-online-users-list
【问题讨论】:
标签: javascript xml xmpp openfire