CN110597503A - Method for automatically constructing web service toolkit based on C # language - Google Patents

Method for automatically constructing web service toolkit based on C # language Download PDF

Info

Publication number
CN110597503A
CN110597503A CN201910884697.6A CN201910884697A CN110597503A CN 110597503 A CN110597503 A CN 110597503A CN 201910884697 A CN201910884697 A CN 201910884697A CN 110597503 A CN110597503 A CN 110597503A
Authority
CN
China
Prior art keywords
bottom layer
web service
language
configuration
layer mapping
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910884697.6A
Other languages
Chinese (zh)
Inventor
周云玉
罗标新
刘波
喻世东
周林华
贾月
黄历
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HUNAN GREATWALL MEDITECH CO Ltd
Original Assignee
HUNAN GREATWALL MEDITECH CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HUNAN GREATWALL MEDITECH CO Ltd filed Critical HUNAN GREATWALL MEDITECH CO Ltd
Priority to CN201910884697.6A priority Critical patent/CN110597503A/en
Publication of CN110597503A publication Critical patent/CN110597503A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/312List processing, e.g. LISP programming language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Abstract

The invention relates to a method for automatically constructing a Web service toolkit based on C # language, belonging to the technical field of computer Web construction, wherein the Web service adopts socket sockets to communicate with a third-party system, and the data format is XML; the Web service is based on a tool pack consisting of a Web service pack and a configuration tool, wherein the Web service pack consists of a service code module, a bottom layer mapping code module and a bottom layer dynamic library module; the method has the advantages that the method is suitable for integrated calling of different language platforms and different service interfaces of a set of system in different environments, and developers only need to utilize a third-party language dynamic library and interface documents thereof to automatically generate web services through simple configuration.

Description

Method for automatically constructing web service toolkit based on C # language
Technical Field
The invention relates to a method for automatically constructing a web service toolkit based on C # language, belonging to the technical field of computer web construction.
Background
At present, the development of network technology is faster and faster, web services are valued and accepted by more and more enterprises and institute organizations, and the web field is wider and wider. How to build web services quickly becomes a popular research topic. The Web service adopts a loose coupling technology, and any system supporting the open network protocol and the data description standard supports the Web service, so that the integration problem of the system is solved. In the prior art, a set of third system cross-platform calls services of languages such as c #, c + +, delphi and pb, a certain amount of code writing work needs to be performed by developers, and the requirements on the developers are high, which results in low Web service development efficiency; in addition, in the prior art, a certain amount of coding work is required for developing a set of web services, the requirements on developers are extremely high, a certain amount of repeated work is brought by subsequent requirement change, and the overall development efficiency is low. When the system needs to be connected with different language platforms, developers need to recode, pack and test, and the development efficiency can be known, so that how to rapidly develop a set of universal web services is very important.
Disclosure of Invention
The invention aims to solve the problems of low efficiency and cross-platform integration of a system for constructing web services, and provides a method for automatically constructing a web service toolkit based on C # language.
The technical scheme of the invention is that the Web service adopts socket sockets to communicate with a third-party system, and the data format is XML; the Web service is based on a tool pack consisting of a Web service pack and a configuration tool, wherein the Web service pack consists of a service code module, a bottom layer mapping code module and a bottom layer dynamic library module;
the service code module receives request data sent by a third-party system, and dynamically calls a bottom layer mapping code module after data analysis, data verification and data conversion, and the bottom layer mapping code module then maps and calls a bottom layer dynamic library module; the bottom layer dynamic library module returns the result to the bottom layer mapping code module after executing the instruction, the bottom layer mapping code module transmits the result to the service code module, and the service code module responds the result to the third-party system in an XML format.
The bottom layer mapping code module comprises the generation of a bottom layer mapping source code and the compilation of the bottom layer mapping source code, the configuration tool generates the bottom layer mapping source code after simple configuration according to a third-party language dynamic library and an interface document in a third-party system, the bottom layer mapping source code generates the bottom layer mapping code after the compilation, and the original service code module and the bottom layer dynamic library module of the tool package form a complete web service package. The service code module receives the request data, analyzes and verifies the data, calls the module and returns response data; and the bottom dynamic library module completely copies the third-party language dynamic library to the bottom dynamic library catalogue.
The configuration tool is divided into method configuration and parameter list configuration, the method configuration comprises method name configuration and return value configuration, the parameter list configuration comprises parameter name configuration, parameter type configuration and data type configuration, and the data type configuration is consistent with a third-party language dynamic library.
And generating a cross-platform web service by referring to simple configuration and copy operations of the third-party language dynamic library interface document.
The web service generation steps are as follows:
s001, copying the prepared third-party language dynamic library to a bottom dynamic library catalog;
s002, configuring data type mapping and interface name mapping of a third party language and a c # language according to the prepared third party language interface document, and storing and generating a bottom layer mapping source code;
s003, compiling the bottom layer mapping source code to generate a bottom layer mapping code, and automatically storing the bottom layer mapping code in a specified directory of the web service package;
s004, a complete web service package is generated, and a third-party system can communicate with the complete web service package only by starting the service.
The invention has the advantages that the invention is suitable for integrated calling of different language platforms and different service interfaces of a set of system in different environments, and developers only need to utilize a third-party language dynamic library and interface documents thereof to automatically generate web services through simple configuration.
Drawings
FIG. 1 is a functional flow diagram of the present invention.
Fig. 2 is a diagram of a kit structure.
FIG. 3 is a diagram of a web service package architecture.
FIG. 4 is a flow diagram of web service package generation.
FIG. 5 is a service code module business flow diagram.
FIG. 6 is a calling module business flow diagram.
FIG. 7 is an underlying mapping code module.
FIG. 8 is a flow diagram of a configuration tool generating an underlying map source code.
FIG. 9 is a flow chart of the present invention.
Detailed Description
In the following, referring to fig. 1 to 9, a preferred embodiment of the present invention is further described, where the Web service uses a socket to communicate with the third-party system 3, and the data format is XML; the Web service is based on a tool kit 100 consisting of a Web service kit 1 and a configuration tool 2, wherein the Web service kit 1 consists of a service code module 11, a bottom layer mapping code module 12 and a bottom layer dynamic library module 13;
the service code module 11 receives request data sent by the third-party system 3, and dynamically calls a bottom layer mapping code module 12 after data analysis, data verification and data conversion, and the bottom layer mapping code module 12 then maps and calls a bottom layer dynamic library module 13; the bottom dynamic library 13 module returns the result to the bottom mapping code module 12 after executing the instruction, the bottom mapping code module 12 transfers the result to the service code module 11, and the service code module 11 responds the result to the third-party system 3 in the XML format, see fig. 1, 2, and 3.
The service code module 11 receives the request data, analyzes and verifies the data by using the calling module, and finally returns the response data, referring to fig. 5, where the calling module includes an obtaining parameter list, a generating parameter list, an invoking method, and a obtaining parameter list, the obtaining parameter list is used for receiving the request data, the obtaining parameter list is used for sending the response data, and the executing invoking method is used for interacting with the bottom layer mapping code module 12, referring to fig. 6.
The bottom layer mapping code module 12 is divided into generation of a bottom layer mapping source code and compilation of the bottom layer mapping source code, as shown in fig. 7.
The configuration tool 2 generates a bottom layer mapping source code after simple configuration according to a third-party language dynamic library and an interface document in a third-party system 3, the bottom layer mapping source code generates a bottom layer mapping code after compiling, and a complete web service package is formed by adding an original service code module 11 and a bottom layer dynamic library module 13 of the tool package, as shown in fig. 4.
The underlying dynamic library module 13 copies the third party language dynamic library in its entirety to the underlying dynamic library catalog, see FIG. 4.
The configuration tool 2 is divided into a method configuration and a parameter list configuration, as shown in fig. 8, the method configuration includes a method name configuration and a return value configuration, the parameter list configuration includes a parameter name configuration, a parameter type configuration and a data type configuration, and the data type configuration is consistent with the third-party language dynamic library.
When the user uses the tool, the user does not need to pay attention to the bottom technical details, and only needs to refer to the third-party language dynamic library interface document for simple configuration and copy operation to generate a cross-platform web service.
The specific web service generation steps are as follows, as shown in fig. 9:
s001, copying the prepared third-party language dynamic library to a bottom dynamic library catalog;
s002, configuring data type mapping and interface name mapping of a third party language and a c # language according to the prepared third party language interface document, and storing and generating a bottom layer mapping source code;
s003, compiling the bottom layer mapping source code to generate a bottom layer mapping code, and automatically storing the bottom layer mapping code in a specified directory of the web service package;
s004, a complete web service package is generated, and a third-party system can communicate with the complete web service package only by starting the service.

Claims (5)

1. The method for automatically constructing the web service toolkit based on the C # language is characterized by comprising the following steps:
the Web service is communicated with a third-party system by adopting a socket, and the data format is XML; the Web service is based on a tool pack consisting of a Web service pack and a configuration tool, wherein the Web service pack consists of a service code module, a bottom layer mapping code module and a bottom layer dynamic library module;
the service code module receives request data sent by a third-party system, and dynamically calls a bottom layer mapping code module after data analysis, data verification and data conversion, and the bottom layer mapping code module then maps and calls a bottom layer dynamic library module; the bottom layer dynamic library module returns the result to the bottom layer mapping code module after executing the instruction, the bottom layer mapping code module transmits the result to the service code module, and the service code module responds the result to the third-party system in an XML format.
2. The method for automatically constructing a web service toolkit based on C # language as claimed in claim 1, wherein:
the bottom layer mapping code module comprises the generation of a bottom layer mapping source code and the compilation of the bottom layer mapping source code, the configuration tool generates the bottom layer mapping source code after simple configuration according to a third-party language dynamic library and an interface document in a third-party system, the bottom layer mapping source code generates the bottom layer mapping code after the compilation, and the original service code module and the bottom layer dynamic library module of the tool package form a complete web service package.
3. The method for automatically constructing a web service toolkit based on C # language as claimed in claim 1, wherein:
the configuration tool is divided into method configuration and parameter list configuration, the method configuration comprises method name configuration and return value configuration, the parameter list configuration comprises parameter name configuration, parameter type configuration and data type configuration, and the data type configuration is consistent with a third-party language dynamic library.
4. The method for automatically constructing a web service toolkit based on C # language as claimed in claim 3, wherein: and generating a cross-platform web service by referring to simple configuration and copy operations of the third-party language dynamic library interface document.
5. The method for automatically constructing web service toolkit based on C # language as claimed in claim 1 to 4, which is characterized by comprising the following web service generation steps:
s001, copying the prepared third-party language dynamic library to a bottom dynamic library catalog;
s002, configuring data type mapping and interface name mapping of a third party language and a c # language according to the prepared third party language interface document, and storing and generating a bottom layer mapping source code;
s003, compiling the bottom layer mapping source code to generate a bottom layer mapping code, and automatically storing the bottom layer mapping code in a specified directory of the web service package;
s004, a complete web service package is generated, and a third-party system can communicate with the complete web service package only by starting the service.
CN201910884697.6A 2019-09-19 2019-09-19 Method for automatically constructing web service toolkit based on C # language Pending CN110597503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910884697.6A CN110597503A (en) 2019-09-19 2019-09-19 Method for automatically constructing web service toolkit based on C # language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910884697.6A CN110597503A (en) 2019-09-19 2019-09-19 Method for automatically constructing web service toolkit based on C # language

Publications (1)

Publication Number Publication Date
CN110597503A true CN110597503A (en) 2019-12-20

Family

ID=68861202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910884697.6A Pending CN110597503A (en) 2019-09-19 2019-09-19 Method for automatically constructing web service toolkit based on C # language

Country Status (1)

Country Link
CN (1) CN110597503A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363705A (en) * 2020-11-10 2021-02-12 中国平安人寿保险股份有限公司 System package generation method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840334A (en) * 2010-04-16 2010-09-22 中国电子科技集团公司第二十八研究所 Software component service packaging method
CN103473034A (en) * 2012-06-06 2013-12-25 阿里巴巴集团控股有限公司 Method and device for dynamically publishing Web service
CN104020992A (en) * 2014-05-28 2014-09-03 北京航空航天大学 Method and device for generating Java Web service through C/C++
CN106815003A (en) * 2015-12-01 2017-06-09 北京触控科技有限公司 The interactive system and exchange method of a kind of computer language
CN109614102A (en) * 2018-10-09 2019-04-12 平安科技(深圳)有限公司 Code automatic generation method, device, electronic equipment and storage medium
CN109901838A (en) * 2019-01-17 2019-06-18 平安证券股份有限公司 Front end development approach, device, equipment and storage medium based on modularization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840334A (en) * 2010-04-16 2010-09-22 中国电子科技集团公司第二十八研究所 Software component service packaging method
CN103473034A (en) * 2012-06-06 2013-12-25 阿里巴巴集团控股有限公司 Method and device for dynamically publishing Web service
CN104020992A (en) * 2014-05-28 2014-09-03 北京航空航天大学 Method and device for generating Java Web service through C/C++
CN106815003A (en) * 2015-12-01 2017-06-09 北京触控科技有限公司 The interactive system and exchange method of a kind of computer language
CN109614102A (en) * 2018-10-09 2019-04-12 平安科技(深圳)有限公司 Code automatic generation method, device, electronic equipment and storage medium
CN109901838A (en) * 2019-01-17 2019-06-18 平安证券股份有限公司 Front end development approach, device, equipment and storage medium based on modularization

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363705A (en) * 2020-11-10 2021-02-12 中国平安人寿保险股份有限公司 System package generation method and device, computer equipment and storage medium
CN112363705B (en) * 2020-11-10 2023-07-28 中国平安人寿保险股份有限公司 System package generation method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
RU2405202C2 (en) Using abstract descriptions to generate, exchange and configure service and client runtimes
US7152090B2 (en) Metadata-aware enterprise application integration framework for application server environment
CN1832478B (en) Dynamic service generation for legacy components
US7953759B2 (en) Simplifying application access to schematized contact data
US10026041B2 (en) Interoperable machine learning platform
JP4643931B2 (en) Web page rendering mechanism using themes based on external programs
CN101436148B (en) Integrated client end and method for performing interaction of desktop application and network WEB application
CN105637478A (en) Computer-aided development of native mobile application code
CN103092602B (en) software development kit
MX2007015887A (en) Data centric workflows.
CN100426750C (en) Method for generating two set of network administration systems
CN102567026B (en) Mobile solution constructing system and Mobile solution construction method
WO2009114999A1 (en) Document processing method, system and device
CN103902283A (en) Method for achieving real-time asynchronous communication through model transformation in CORBA
CN107450993A (en) A kind of data interactive method of distributed IEC61850 communication components
CN110597503A (en) Method for automatically constructing web service toolkit based on C # language
US8880561B2 (en) Computer system and computerized method for storing business objects and business mapping data
US7392060B2 (en) Mobile exchange infrastructure
US10725744B2 (en) Method for adapting to blockchain and device, terminal and medium performing the same
US9513878B2 (en) Component integration by distribution of schema definition on heterogenous platforms
CN116795351A (en) Method and device for generating software tool package and readable storage medium
KR100545348B1 (en) An integrated development system for a SyncML server application development
CN111984679A (en) Access method, device, host, system and medium of hardware acceleration database
CN117155991B (en) gRPC-gateway proxy gateway generation method based on configuration
CN102404391A (en) WEB service invoking method oriented to interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination