Method and device for data access based on SOA (Service-Oriented Architecture)
A data access and configuration file technology, applied in the field of management information systems, can solve the problems that DBAdapter cannot meet the requirements of dynamic structure of SQL statements, data access methods cannot flexibly respond to SQL changes, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0030] figure 1 This is a flow chart of an SOA-based data access method according to Embodiment 1 of the present invention. like figure 1 As shown, this embodiment includes:
[0031] Step S102: Receive an invocation instruction of the business service, where the invocation instruction includes: SQL ID and query parameters;
[0032] Step S104: Obtain the XML configuration file corresponding to the SQL ID, and parse the SQL original statement according to the XML configuration file;
[0033] Step S106: construct a complete SQL statement according to the original SQL statement and query parameters;
[0034] Step S108: Perform a query in the database according to the complete SQL statement to obtain the query result.
[0035] In this embodiment, before step S102, the method may further include: assigning SQL IDs to SQL original statements corresponding to each query service, and writing each original SQL statement as an XML configuration file. The SQL ID is the unique identif...
Embodiment 2
[0038] figure 2 It is a relationship diagram of the system structure of the SOA-based data access method according to the second embodiment of the present invention. like figure 2 As shown, in this embodiment, an XML configuration file is first written, and the XML configuration file saves the original SQL statement information required by the query, including the relevant filter condition information; secondly, the DAS service is deployed, and the internal program of the DAS service is divided into four main parts, including the configuration File monitoring program, XML file parsing program, dynamic SQL statement construction program, data query and binding program, after the external request is sent, the DAS service dynamically constructs the SQL statement according to the read native SQL statement, performs parameter binding; finally accesses the database , obtain the required data, and output it according to the Webservice standard format.
[0039] The SOA-based data ...
Embodiment 3
[0045] image 3 This is a flowchart of the SOA-based data access method in Embodiment 3 of the present invention. like image 3 As shown, this embodiment includes a preprocessing part and a response processing part. In the embodiment part, the original code of the program is also given, which is displayed with a gray background for easy identification. This embodiment includes:
[0046] Preparatory part:
[0047] Step S302: Write an XML configuration file, strip the SQL statements used by each query service, and write them into the *.XML configuration file. It is recommended to write a separate configuration file for each query service. Each SQL has a unique ID mark, and the query parameters are in Use #PARAMETER1# instead in SQL; a sample XML configuration file is as follows:
[0048] ——Name the unique ID flag of SQL
[0049] ——The following is stripped out
[0050] Example of SQL Statement Body
[0051] SELECT*
[0052] FROM AP_INVOICES_ALL INV
[0053] @END@——END i...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com