Issue with establishing Openfire XMPP Connection Android on live server via Asmack

Issue with establishing Openfire XMPP Connection Android on live server via Asmack . I am unable to establish a connection with the server. The same code is working fine when i point it on a localhost but the issue occurs when pointed on live server.

Exception caught while establishing connection : Connection failed. No response from server

xmppConfig = new ConnectionConfiguration(Constants.XMPP_BASE_URL, Constants.XMPPP_PORT,Constants.XMPP_RESOURCE);
xmppConfig.setSASLAuthenticationEnabled(true);
xmppConfig.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
if (xmppConfig == null)
    throw new NullPointerException("XMPPService must be configured before it can connect!");
try {
    if (xmpp == null) {
        xmpp = new XMPPConnection(xmppConfig);
    }
    xmpp.connect();
    state = State.CONNECTED;
} catch (XMPPException ex) {
    Log.d(XMPPController.class.getName(), ex.toString());
}

Answers


Issue has been resolved. The issue actually existed on the server side. Some server side settings were blocking the use of open-fire. This issue is not existed on android side.


Need Your Help

How to POST to an XML API?

php api

We are integrating the travel API of www.transhotel-dev.com.