Hi
Trying out XMPP for the first time, with 4.0rc1, operating against an ejabberd 2.10 host.
I've come up against problems with connecting. Firstly :
XMPPConnection connection = new XMPPTCPConnection(config);
connection.connect();
connection.login("user", "password1");
Was bombing on the connection due to "No non-anonymous SASL connection modes" type error.
This is because the all-important message[1] containing the supported SASL modes has not arrived by the time login() is executed. I can't tell if that's because the server is slow, or that the pause is in sending the outbound queued message. Either way, it's a race condition, and inserting
Thread.sleep(30000);
between connect and login fixes it, ugly though that may be.
Secondly, I seemed to have to disable TLS with
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
If I don't, then by the time we get to SASLMechanism:170 "sc.hasInitialResponse()", the answer is 'no', and we end up sending 'null' as authenticationText (Which unsurprisingly doesn't work).
tls start and proceed messages have been exchanged [2], so I don't know why it's the case that it's not happy in that route.
[1]
<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3833841800' from='blah.com' version='1.0' xml:lang='en'>
<stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>SCRAM-SHA-1</mechanism><mec hanism>ANONYMOUS</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</m echanism></mechanisms><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='TQ2JFyRoSa70h2G1bpgjzuXb2sU='/><register xmlns='http://jabber.org/features/iq-register'/></stream:features>
[2] <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>