public static void setSoftwareVersionDataFormFromDiscoInfo(Element query ,LocalSession session){
        boolean containDisco = false;
        boolean typeformDataSoftwareInfo = false;
        if (query != null && session != null){
            for (Element element : query.elements()){
                if ("feature".equals(element.getName()) 
                    && NAMESPACE_DISCO_INFO.equals(element.attributeValue("var")) ){
                    containDisco = true;
                }
                if (containDisco && "x".equals(element.getName()) 
                    && "jabber:x:data".equals(element.getNamespaceURI())
                    && "result".equals(element.attributeValue("type"))){
                    for (Element field : element.elements()){
                        if (field == null) {
                            continue;
                        }
                        if (field.attributeValue("var").equals("FORM_TYPE")
                            && field.element("value")!= null
                            && field.element("value").getText().equals("urn:xmpp:dataforms:softwareinfo")) { 
                            typeformDataSoftwareInfo = true;     
                        }
                        if (typeformDataSoftwareInfo) {
                            if (field.element("value") != null && !"urn:xmpp:dataforms:softwareinfo".equals(field.element("value").getText())) {
                                session.setSoftwareVersionData(field.attributeValue("var"), field.element("value").getText());
                            }
                            else if (field.element("media") != null && field.element("media").element("uri") != null) {
                                session.setSoftwareVersionData("image", field.element("media").element("uri").getText());
                            }
                        }
                    }    
                }
            }
        }
    }
Set all Software Version data  
responsed by the peer for the Software information request Service Discovery (XEP-0232)
@param query represented on the response of the peer
@param session represented the LocalSession with peer
xmppserver/src/main/java/org/jivesoftware/openfire/disco/IQDiscoInfoHandler.java