Unable to connect to slack xmpp gateway

I have activated the slack xmpp gateway. I could connect to it from pidgin to validate that it’s working : it does ;-p

Now, i’m starting the java part, but i get the following message and i just could not receive any message :

INFOS: Could not resolve DNS SRV resource records for _xmpp-client._tcp.rastadidi.xmpp.slack.com. Consider adding those.

I have tried the very latest smack version as i saw it could do the job on some ticket here but no luck for me, it did not work

Here is an extract of my pom :

    <!-- https://mvnrepository.com/artifact/org.igniterealtime.smack/smack-core -->

org.igniterealtime.smack

smack-core

4.2.1-beta1

org.igniterealtime.smack

smack-java7

4.2.1-beta1

org.igniterealtime.smack

smack-tcp

4.2.1-beta1

org.igniterealtime.smack

smack-im

4.2.1-beta1

org.igniterealtime.smack

smack-extensions

4.2.1-beta1

ANd here is the java code (passwd replaces by stars) :

XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();

configBuilder.setUsernameAndPassword(“adrien”, “********”);

//configBuilder.setResource(“SomeResource”);

configBuilder.setXmppDomain(“rastadidi.xmpp.slack.com”);

AbstractXMPPConnection connection = new XMPPTCPConnection(configBuilder.build());

// Connect to the server

connection.connect();

// Log into the server

connection.login();

ChatManager chatManager = ChatManager.getInstanceFor(connection);

        EntityBareJid jid = JidCreate.entityBareFrom("adrien@rastadidi.xmpp.slack.com");

Chat chat = chatManager.chatWith(jid);

chat.send(“Howdy!”);

// send a message to room !

connection.disconnect();

I’m the developer of Oracle XMPP/Jabber Instant Messenger download | SourceForge.net

I’m currently working on updating the project and move it to github…and migrate it to Oracle 12c…and i strongly believe that it would have a very high added value to connect to slack ;-p

Here is the debug ouput :


Building oracle-xmpp 1.0-SNAPSHOT


— exec-maven-plugin:1.2.1:exec (default-cli) @ oracle-xmpp —

juil. 11, 2017 9:20:06 AM org.jivesoftware.smack.util.DNSUtil resolveDomain

INFOS: Could not resolve DNS SRV resource records for _xmpp-client._tcp.rastadidi.xmpp.slack.com. Consider adding those.

09:20:07 SENT (0): <stream:stream xmlns=‘jabber:client’ to=‘rastadidi.xmpp.slack.com’ xmlns:stream=‘http://etherx.jabber.org/streams’ version=‘1.0’ from=‘adrien@rastadidi.xmpp.slack.com’ xml:lang=‘en’>

09:20:07 RECV (0): <stream:stream xmlns=‘jabber:client’ xmlns:stream=‘http://etherx.jabber.org/streams’ id=‘4488261950491370028-0’ from=‘rastadidi.xmpp.slack.com’ version=‘1.0’>stream:features </stream:features>

09:20:07 SENT (0):

09:20:08 RECV (0):

09:20:09 SENT (0): <stream:stream xmlns=‘jabber:client’ to=‘rastadidi.xmpp.slack.com’ xmlns:stream=‘http://etherx.jabber.org/streams’ version=‘1.0’ from=‘adrien@rastadidi.xmpp.slack.com’ xml:lang=‘en’>

09:20:09 RECV (0): <stream:stream xmlns=‘jabber:client’ xmlns:stream=‘http://etherx.jabber.org/streams’ id=‘4488261950491370028-1’ from=‘rastadidi.xmpp.slack.com’ version=‘1.0’>stream:features PLAIN </stream:features>

09:20:09 SENT (0): AGFkcmllbgByYXN0YWRpZGkuQUF1MjFrelFKd29wb1hwTGlleWo=

09:20:09 RECV (0):

09:20:09 SENT (0): <stream:stream xmlns=‘jabber:client’ to=‘rastadidi.xmpp.slack.com’ xmlns:stream=‘http://etherx.jabber.org/streams’ version=‘1.0’ from=‘adrien@rastadidi.xmpp.slack.com’ id=‘4488261950491370028-1’ xml:lang=‘en’>

09:20:10 RECV (0): <stream:stream xmlns=‘jabber:client’ xmlns:stream=‘http://etherx.jabber.org/streams’ id=‘4488261950491370028-2’ from=‘rastadidi.xmpp.slack.com’ version=‘1.0’>stream:features </stream:features>

09:20:10 SENT (0):

09:20:10 RECV (0): adrien@rastadidi.xmpp.slack.com//tpapOFRe3U=

09:20:10 SENT (0):

09:20:10 RECV (0):

09:20:10 User logged (0): adrien@rastadidi.xmpp.slack.com:5222//tpapOFRe3U=

09:20:10 RECV (0):

09:20:10 RECV (0):

09:20:10 SENT (0):

09:20:10 XMPPConnection authenticated (XMPPTCPConnection[adrien@rastadidi.xmpp.slack.com//tpapOFRe3U=] (0))

09:20:10 SENT (0):

09:20:10 SENT (0):

09:20:10 SENT (0): Howdy!

09:20:10 SENT (0): </stream:stream>

09:20:11 XMPPConnection closed (XMPPTCPConnection[adrien@rastadidi.xmpp.slack.com//tpapOFRe3U=] (0))

I get a success output code but i get no message.

I have tested with the 3.2.1 version of smack(x) api and i could send to slack with success.

09:20:10 SENT (0): Howdy!

Well the message is sent.

You should try to compare this with what pidgin sends over the wire.