private IQ getIQ(Element doc) {
        Element query = doc.element("query");
        if (query != null && "jabber:iq:roster".equals(query.getNamespaceURI())) {
            return new Roster(doc);
        }else if (query != null && "jabber:iq:version".equals(query.getNamespaceURI())) {
            IQ iq = new IQ(doc);
            if (iq.getType().equals(IQ.Type.result) && iq.getFrom().equals(session.getAddress())){
                try {
                    List<Element> elements =  query.elements();
                    if (!elements.isEmpty()){
                        for (Element element : elements){
                            session.setSoftwareVersionData(element.getName(), element.getStringValue());
                        }
                    }    
                } catch (Exception e) {
                    Log.error(e.getMessage(), e);
                }  
            }
            return iq;
        }else if(query != null && "http://jabber.org/protocol/disco#info".equals(query.getNamespaceURI())){
            //XEP-0232 if responses service discovery can include detailed information about the software application
            IQ iq = new IQ(doc); 
            if(iq.getFrom().equals(session.getAddress())){
                IQDiscoInfoHandler.setSoftwareVersionDataFormFromDiscoInfo(query, session);
            } 
            return new IQ(doc);
        }else {
            return new IQ(doc);
        }
    }
Close the connection since TLS was mandatory and the entity never negotiated TLS. Before
closing the connection a stream error will be sent to the entity.
xmppserver/src/main/java/org/jivesoftware/openfire/net/SocketReader.java