I see no reply in your log from the server to the IQ “get” for registration info. Did you leave this out, or is it simply not there? If it’‘s not there, then that sounds like a server bug. The only thing the supportsAccountCreation method does is check to make sure that the reply to the iq get for account creation information was’'t an error and that it came.
i think smack lib is not very good compatible with other jabber servers, but it is work very good for jive messager server.
i read some smack source code, when i invoke smack lib to communicate with openim server, the connection is alwalys close, because openim server is not compatible with smack lib, for examples:
i want to get account attributes
my code is follwing:
try{
XMPPConnection.DEBUG_ENABLED = true;
String jabberServer = “192.168.1.94”;
String port = “5222”;
connection = new XMPPConnection(jabberserver,Integer.parseInt(port));
From the XML, the stream is addressed to the IP address. XMPPConnection() should be given the Jabber server hostname, and not the IP address.
Now it’‘s possible that you don’'t have a DNS address for your Jabber server. Since that was my case too, I wrote my own SSLXMPPConnection subclass (in the other forum thread) that allows you to separately specify the socket-level hostname from the XMPP-level.
I guess the Smack developers should support that for the non-SSL XMPPConnection.
I have no idea why the OpenIM server doesn’‘t reply to the IQ get for account information. I believe that it should according to the register spec and I don’'t see anything wrong with the packet. Therefore, I can only assume this is a server bug.
address. XMPPConnection() should be given the Jabber
server hostname, and not the IP address.
Depending on the server, it’‘s actually possible that the IP address could work fine (if the server is configured so that it’‘s name is the IP address). However, I know what you’'re referring to in general and I think the solution is to use the server name for future packets that the server replies with after the connection open.