connection.getAccountManager().supportsAccountCreation() can''s work

my jabber server is openim, and my jabber client is gaim,

gaim can create account correctly.

but when i use smack lib to create account , then failure,

the debug info is following:

client info:

<stream:stream to=“192.168.1.211” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams”>

</stream:stream>

server info:

<?xml version=''1.0'' encoding=''UTF-8'' ?>

<stream:stream xmlns:stream=’‘http://etherx.jabber.org/streams’’ id=’‘1064372670179’’ xmlns=’‘jabber:client’’ from=’‘192.168.1.211’’ version=’‘1.0’’>

maybe openim has some bug? openim have no response for client request?

but openim is support create account, if i comment some code at createAount method in AccountManager class

if (!supportsAccountCreation()) {

throw new XMPPException(“Server does not support account creation.”);

}

i suggest remove the check supportaccountCreation code form createAccount method, because smack has public supportaccountcreation api,

my english is poor, if u cant understant my words, sorry for it,thx

lovehouse,

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.

Regards,

Matt

matt,

thanks u reply so soon.

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));

connection.login(“test”,“test”);

java.util.Iterator iterator = connection.getAccountManager().getAccountAttributes();

}catch(Exception me){

System.out.println(me.toString());

}

client debug info:

</stream:stream>

openim server not response the correctly info,

may i can use smack lib to develope a common IM Client?

Best Regards!

lovehouse

Message was edited by: lovehouse

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.

hello mparaz,

why must given the jabber server only hostname, i think jabber server get correct ip address can run correctly.

because if gaim as my jabber client, i send ip address to jabber server, and openim jabber server work correctly?

thx!

lovehouse,

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.

Regards,

Matt

From the XML, the stream is addressed to the IP

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.

-Matt

matt,

thx u very much,

it is a bug for opemim server,