xmpp 带内注册失败

问题描述

使用匿名登录后,注册总是会返回失败。如果使用实名登录可以注册成功。服务器是openfire,以下是通讯的xmpp报文,不知道那个步骤存在问题。请大拿指教。C:<?xmlversion="1.0"?><stream:streamto="192.168.1.126"xml:lang="en"version="1.0"xmlns="jabber:client"xmlns:stream="http://etherx.jabber.org/streams">S:<?xmlversion='1.0'encoding='UTF-8'?><stream:streamxmlns:stream="http://etherx.jabber.org/streams"xmlns="jabber:client"from="jonnylocal"id="c883ad61"xml:lang="en"version="1.0"><stream:features><starttlsxmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanismsxmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compressionxmlns="http://jabber.org/features/compress"><method>zlib</method></compression><authxmlns="http://jabber.org/features/iq-auth"/><registerxmlns="http://jabber.org/features/iq-register"/></stream:features>C:<authmechanism="ANONYMOUS"xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>S:<successxmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>C:<?xmlversion="1.0"?><stream:streamto="192.168.1.126"xml:lang="en"version="1.0"xmlns="jabber:client"xmlns:stream="http://etherx.jabber.org/streams">S:<?xmlversion='1.0'encoding='UTF-8'?><stream:streamxmlns:stream="http://etherx.jabber.org/streams"xmlns="jabber:client"from="jonnylocal"id="c883ad61"xml:lang="en"version="1.0"><stream:features><compressionxmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bindxmlns="urn:ietf:params:xml:ns:xmpp-bind"/><sessionxmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>C:<iqid="_xmpp_bind1"type="set"><bindxmlns="urn:ietf:params:xml:ns:xmpp-bind"/></iq>S:<iqtype="result"id="_xmpp_bind1"to="jonnylocal/c883ad61"><bindxmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>c883ad61@jonnylocal/c883ad61</jid></bind></iq>C:<iqid="_xmpp_session1"type="set"><sessionxmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>S:<iqtype="result"id="_xmpp_session1"to="c883ad61@jonnylocal/c883ad61"/>C:<iqid="reg1"xmlns="jabber:client"type="get"><queryxmlns="jabber:iq:register"/>S:</iq><iqtype="result"id="reg1"to="c883ad61@jonnylocal/c883ad61"><queryxmlns="jabber:iq:register"><username/><password/><email/><name/><xxmlns="jabber:x:data"type="form"><title>XMPPClientRegistration</title><instructions>Pleaseprovidethefollowinginformation</instructions><fieldvar="FORM_TYPE"type="hidden"><value>jabber:iq:register</value></field><fieldvar="username"type="text-single"label="Username"><required/></field><fieldvar="name"type="text-single"label="Fullname"/><fieldvar="email"type="text-single"label="Email"/><fieldvar="password"type="text-private"label="Password"><required/></field></x></query></iq>C:<iqid="reg2"xmlns="jabber:client"type="set"><queryxmlns="jabber:iq:register"><username>testwhy999</username><password>999</password><email/><name/></query></iq>S:<iqtype="error"id="reg2"to="c883ad61@jonnylocal/c883ad61"><queryxmlns="jabber:iq:register"><username>testwhy999</username><password>999</password><email/><name/></query><errorcode="400"type="modify"><bad-requestxmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

解决方案

解决方案二:
看报文感觉没有问题,有返回错误码吗?
解决方案三:
有啊,你看服务器最后返回的错误码是400.

时间: 2024-08-12 16:03:28

xmpp 带内注册失败的相关文章

服务器-带内注册返回bad-request

问题描述 带内注册返回bad-request 我参考的带内注册方法:jabber协议如何注册一个用户在和服务器(openfire3.8.1)建立连接后向服务器请求注册: <iq type='get' id='uid1'> <query xmlns='jabber:iq:register'/></iq> 然后又发送了 <iq id='uid2' type='set'> <query xmlns='jabber:iq:register'> <u

关于新建SQL Server注册失败的问题

server|问题 我在客户端用SQL Server 2000"企业管理器"--〉新建SQL Server注册时,输入数据库服务器IP地址,遇到注册失败, 被告知没找到我指定的数据库服务器.在弹出的注册框右上角的带三个小点的小按钮(也就是输入服务器ip地址栏右边的按钮)来选择局域网中的数据库服务器,却发现那个服务器名称没有!我也算是装了N个SQL Server 2000数据库服务器的人了,竟然遇到这种问题!郁闷了2个月.最近突然想起,SQL Server 2000服务器,没打上SQL

windows-ocx注册失败,与Windows版本不兼容

问题描述 ocx注册失败,与Windows版本不兼容 已经将VS2010生成的OCX控件放入系统文件夹下( c:Windowssystem32)(c:WindowsSysWOW64)了,还是不能注册,求各位大神指教. 解决方案 是vc++还是C#写的,前者用regsvr32,后者用regasm 解决方案二: ocx注册失败注册ocx不兼容注册flash.ocx inno setup 解决方案三: 你的系统环境有没有vs2010的运行时库等.你要带上跟你的ocx

win8系统设置图片密码提示注册失败怎么办

 win8系统设置图片密码提示注册失败怎么办   1.在Win8系统中找到要使用的图片,右键点击属性; 2.在属性窗口,选择"安全"选项卡.然后点击"编辑"; 3.在组和用户名下,依次点击选中,然后将下面的允许权限更改为"完全控制"点击应用确定即可用它来设置图片密码; Win8系统设置图片密码的方法: 1.点击组合键[Win+I],找到[设置]并点击,接着再点击[更改电脑设置],找到[电脑设置]之后点击里面的[账户]选项; 2.先设置好用户密码,

android-如何存储app内注册的信息

问题描述 如何存储app内注册的信息 新手,求教.怎样将用户注册以及使用的信息备份到服务器端,以下一次使用.因为是第一次开发app,还希望各位前辈教授一下,谢谢- 解决方案 可以用restful提交给后台程序,大概流程是这样: 1.客户端收集用户的信息: 2.通过网络组件发送给服务器端: 3.服务器端接收(PHP//JSP//NODEJS//ASP)都可以: 4.从第(3)部获取的数据,存到数据库里面去. 如果要获取数据,则从服务器获取就可以了. 解决方案二: web service,提交jso

visual studio-InstallShield Limited Edition注册失败,显示项目创建失败

问题描述 InstallShield Limited Edition注册失败,显示项目创建失败 官网下载,邮箱注册,获得序列号,新建项目,让输入离线response text,点击obtain a new request code,输入序列号,生成response text,然后项目创建失败... 为何没有让在线输入序列号?

请帮我看看错在那里了,一直提示注册失败

问题描述 usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Data.SqlClient;usingSystem.Configuration;usingSystem.Data.OleDb;usingSystem.Data;namespaceIndexEvaluationS

ios 推送证书上传后 为什么还是提示注册失败呢?Error=3000

问题描述 **ios 推送证书上传后 为什么还是提示注册失败呢?Error=3000** 解决方案 推送证书跟注册没关系.你可以百度去搜error 3000,网上有解决的办法.

webim注册用户时 点击注册后会提示注册失败 但是可以看到环信后台注册成功

问题描述 $("#regist").on('click', function() {            //清空消息            $("#username_msg span").html("");            $("#nickname_msg span").html("");            $("#password_msg span").html(&quo