From what you've posted so far, it sounds a bit like process listening on port 5222 isn't using SSL. As a diagnostic, maybe try the answer found here:
https://serverfault.com/questions/37699/how-to-check-if-a-server-support-xmpp-protocol/37722#37722
Moreover, it looks like from here: https://stackoverflow.com/questions/3452161/which-ports-does-xmpp-use, that connections on port 5222 conventionally are not SSL-protected (see RFC 3920, Appendix D1).