嫌在Android上,收到错误code =" 404"远程服务器未找到,同时通过当地的Openfire服务器发送两个用户之间的数据包/消息服务器、数据包、未找到、当地

2023-09-07 11:32:51 作者:楠栀

我很高兴通过本地的Openfire服务器里它连接到Gmail的服务器主机来实现嫌在Android和它的工作就像魅力。本教程发现这里

I was glad to implement smack on android via local Openfire server where it connects to Gmail server-host and it worked like charm. The tutorial found here

但我发现了一个错误(粘贴以下),当我试图连接通过安卓模拟器两个用户通过安装在本地的Openfire服务器。

But I'm getting an error (pasted below) when I'm trying to connect two users via android emulators with a local Openfire server installed.

03-23 16:24:01.392: DEBUG/SMACK(233): 04:24:01 PM SENT (1155246128): <message id="t0tgA-5" to="justestingchat2" type="chat"><body>hi</body></message>
03-23 16:24:07.032: DEBUG/SMACK(233): 04:24:07 PM RCV  (1155246128): <message id="t0tgA-5" to="justestingchat@admin-pc/Smack" from="justestingchat2" type="error"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>
03-23 16:24:07.062: INFO/System.out(233): Received message: null

下面是我的一些制度层面的描述:

在我试图android的连接两个用户使用不同的用户名,电子邮件和密码,通过两个仿真器。 在的Openfire的仪表盘时,都记录在 presence presence =新的presence(presence他们 - 在两个用户显示可用presence .Type.available); 从错误code以上消息ID粘贴一样,我想是没有问题这一点。 (纠正我,如果我错了) 我用的是包监听器如上面提供的教程 code 我也尝试过使用聊天管理器中使用该 code 但没有用,它返回空 I'm trying to connect two users with different user name, e-mail and passwords via two emulators in android. Both the user show "Presence - Available" in the dashboard of Openfire when they are logged in Presence presence = new Presence(Presence.Type.available); From the Error code pasted above the Message Id is same and i guess there is no problem with that. (correct me if I'm wrong) I use the Packet Listener as provided in the tutorial above code I also tried using chat manager in listening to the message using this code but no use it returned "Null"

请能有人帮我有什么实际问题?如果它可以与谷歌谈论为什么不在本地服务器?或者是它可能是使用仿真器,因为?

Please can some one help me what's actually wrong? If it could work with google talk why not local server? Or is it may be because of using emulator?

更新1:

有关找出问题所在!我下载星火客户端和做了一些测试。我已经发现了的我能够从星火发送数据包/消息,Android客户端,但没有从Android的星火,这给了我一个404错误!任何一个可以依然帮我ATLEAST一些线索好吗?

For finding out where the problem is! I downloaded Spark client and did some testing. I have found out that I'm able to send packets/messages from Spark to Android Client but not from Android to Spark, which gives me a Error 404! Can any one still help me with atleast some clues please?

推荐答案

您的Andr​​oid code是错误的。您发送邮件到一个JID不包括的XMPP域 justestingchat2 。尝试发送邮件到 justestingchat2 @联系-PC

Your Android code is wrong. You are sending your message to a Jid which does not include the xmpp domain justestingchat2. Try to send your message to justestingchat2@admin-pc

 
精彩推荐