Map processedTypeMap = new HashMap();
Map processedSchemaMap = new HashMap();
Parameter parameter = new Parameter(Config.class, "config");
parameter.setNamespace("http://ws.apache.org/axis2/rmi");
parameter.populateMetaData(configurator, processedTypeMap);
parameter.generateSchema(configurator, processedSchemaMap);
XmlStreamParser xmlStreamParser = new XmlStreamParser(processedTypeMap, configurator, processedSchemaMap);
return (Config) xmlStreamParser.getObjectForParameter(xmlReader, parameter);
} catch (IOException e) {
throw new ConfigFileReadingException("Can not read configuration file", e);