2016-11-21 35 views
0

我trygin連接到我已經創建這裏Jabberd2服務器是我做的:XMPP Jabberd2連接問題

ConnectionConfiguration configuration = new; ConnectionConfiguration("localhost", 5222); 
    configuration.setDebuggerEnabled(true); 
    XMPPConnection connection = new XMPPConnection(configuration); 
    connection.connect(); 

connect();部分我得到這個錯誤:

stream:error (text) 
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:260) 
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43) 
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70) 

,這是我的Smack調試: 發送:

<stream:stream to="localhost" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"> 
    <presence id="iuS06-0" type="unavailable"></presence> 
    </stream:stream> 

收稿日期:

<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='localhost' version='1.0' id='yawymcwsfxk8mzlyapv1y5pvgi9ngnpfxmdky9dd' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream> 

我在做什麼錯?

回答

0

原來我錯過了c2s.xml中的一節