【发布时间】:2023-03-05 13:50:01
【问题描述】:
我正在使用 RobbieHanson IOS XMPP 框架,并且能够使用示例应用程序正确连接到 Google Talk,该示例应用程序显示具有在线状态的花名册。
但是,当我使用 XMPP 框架连接到 Cisco IM Presence 服务器(基于 XMPP)时,我能够连接到服务器,但是没有创建名册,并且我在 NSLog 中收到以下错误框架。
NSLog:
2013-02-18 20:32:07:015 iPhoneXMPP[26080:12f03] SEND: <iq type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/></iq>
2013-02-18 20:32:07:064 iPhoneXMPP[26080:12f03] RECV: <iq xmlns="jabber:client" to="userid@cisco.com/312468361axcdf9887297cfd57d3e98474e447" type="error"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>8222d2468361a8ff9887297cfd57d3e98474e447</resource></bind><error code="400" type="modify"><bad-request
当我将此日志与从另一个正确连接到 Cisco IM Presence 服务器的 IM 客户端生成的日志(以下详细信息)进行对比时,问题似乎是 <iq> 实体缺少 <id> 属性
IM 客户端日志围绕连接的 IQ 设置:
<iq type='set' id='purple95a4a0c3'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>pidgin</resource></bind></iq>
我想检查是否有办法为 XMPPFramework 中的<iq> 元素设置 id 属性和/或我是否需要做其他事情来解决这个问题。
附带说明一下,我注意到 Google Talk 无需在 <iq> 元素中使用 id 属性即可工作,而 http://xmpp.org/rfcs/rfc3920.html#stanzas-semantics-iq 的 xmpp 规范表明 id 是 <iq> 元素的必需属性。
【问题讨论】:
标签: ios objective-c ios6 instant-messaging xmppframework