This paper addresses the problem of integrating ontological knowledge bases into complex software applications by proposing a library for exposing ontology access and manipulation as web services. The proposed framework is an extension of our previous work, the M2O framework, and enhances it by integrating reasoning techniques and generating a web services layer for performing basic CRUD operations and inferred information retrieval over ontologies. The ontology access is provided by 3rd party APIs, such as Jena API for simple ontology access or D2RQ, in case of using ontologies mapped to relational databases for storing individuals. An object oriented layer is generated to intermediate the flow of information between the data sources and web services. The ontology, the reasoning rules and the database may be generated at runtime by using Java reflection techniques. The framework is used with the Diagnostic ontology to perform a set of experiments that illustrate the benefits of the proposed solution, such as code complexity reduction and reasoning capabilities.