| Web Services technology provides a platform for interoperation between different software applications on different platforms. It is widely used in Web application development because of its characteristics of openness and loose coupling. As the most frequently developed web services, data services provide access to database. Because there are a lot of redundant codes in data services and automatic generation of data services can save a lot of development cost, it is necessary to research automated data service generation.The function of automatically generated data services that this paper studies is not fixed, limited and unchanging. Different data services are generated according to different users’ requriements. In this paper, a formal language that describes the function of data service is designed. A user can express the function of a data service concisely according to the language rules, thus ensuring the generation of the data service meeting the user’s requirements. The information describing the function of a data service is stored in text format. This paper designs a method to analyze the text file, and the analysis results will be directly used for generation of WSDL files and data service implementation codes. This paper designs a mapping method which maps the content of the analysis results to the content of WSDL file and data service source codes. Using this method,the WSDL interface file and the data service codes files can be generated.This paper designs a mapping method from the XSD information model to database tables, which guides the automatic creation of tables in the database and eliminate the process of artificially designing and creating database tables. Meanwhile, users can add data integrity constraints to the tables through configuration files.A proto-system of automatic data service generation are designed and implemented in this paper. In this system, the formalized file that describes the function of data service, the information model file and the related configuration file are the three inputs. Through analyzing the input files, the WSDL files are generated, related tables are automatically created in database and the source code files of data services impolkementation are generated. Users can publish and use the generated data services directly. Thereby this system can save a lot of development costs. |