【问题标题】:No session IQ response from the google talk server using XMPP使用 XMPP 的谷歌谈话服务器没有会话 IQ 响应
【发布时间】:2013-05-17 09:33:11
【问题描述】:

我正在尝试模仿 XMPP 流来连接到 google talk 服务器。 但是,我在发送会话 IQ 时遇到了问题:

问题:发送后我没有收到来自服务器的任何响应:

<iq id="skcevhxmpp_ceschool@gmail.com_6" type="set" to="gmail.com"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>

这是完整的流程:

<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>**
<stream:stream from="gmail.com" id="7FB5653900A7A245" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>

<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>

<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
<stream:stream from="gmail.com" id="508024A63664BA3D" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>

<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">{Valid auth token}</auth>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>

<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
<stream:stream from="gmail.com" id="A407B98F76E98F73" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<stream:features><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>

<iq id="skcevhxmpp_ceschool@gmail.com_5" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>xmpp</resource></bind></iq>
<iq id="skcevhxmpp_ceschool@gmail.com_5" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>ceschool@gmail.com/xmppFC762B4C</jid></bind></iq>

<iq id="skcevhxmpp_ceschool@gmail.com_6" type="set" to="gmail.com"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>

额外信息:

预期的响应是这样的:

<iq xmlns="jabber:client" from="gmail.com" type="result" id="skcevhxmpp_ceschool@gmail.com_6" />

提前致谢!

【问题讨论】:

    标签: xmpp google-talk


    【解决方案1】:

    尝试发送不带 to 属性的会话 iq。

    <iq id="abcd" type="set">
      <session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
    </iq>
    

    【讨论】:

    • 感谢您的回复。我试过没有 to 属性,但仍然是同样的问题。
    猜你喜欢
    • 2015-08-09
    • 2011-10-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-08
    相关资源
    最近更新 更多