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.

Inactive Publication Date: 2011-06-29
CHINA MOBILE COMM GRP CO LTD
View PDF0 Cites 24 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The purpose of the present invention is to solve the problem that the SOA-based data access method in the prior art cannot flexibly cope with SQL changes, and the use of DB Adapter cannot mee

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for data access based on SOA (Service-Oriented Architecture)
  • Method and device for data access based on SOA (Service-Oriented Architecture)
  • Method and device for data access based on SOA (Service-Oriented Architecture)

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and device for data access based on an SOA (Service-Oriented Architecture). The method comprises the following steps: receiving a call instruction of business service, wherein the call instruction comprises an SQL (Structured Query Language) ID (Identity) and an inquiry parameter; obtaining an XML (X Extensible Markup Language) configuration file corresponding to the SQL ID; according to the XML configuration file, analyzing an SQL original statement; according to the SQL original statement and the inquiry parameter, constructing a whole SQL statement; according to the whole SQL statement, inquiring in the database; and obtaining an inquiring result. In the method, the device can serve as a data access layer in an SOA system to finish inquiring various types of databases. The method and the device are especially suitable for complex and dynamic inquiry in a BPEL (Business Process Execution Language) flow, and can be used for overcoming the defects of a DB (Data Bank) adapter inquiry mode provided by manufacturers. The method and the device have the characteristics of simplicity, convenience, flexibility and the like.

Description

technical field [0001] The invention relates to the technical field of management information systems, in particular to a SOA-based data access method and device. Background technique [0002] SOA (Service-Oriented Architecture, Service-Oriented Architecture) enables software developers to rapidly develop, integrate and reuse applications by establishing a unified architecture. More importantly, based on this software framework, the system can dynamically respond to new requirements and quickly reassemble various software components and services after business changes. Today's SOA-based integration approach is driving the market, and mainstream vendors such as BEA, IBM, Microsoft, Oracle, and others have turned to SOA. [0003] As the concept of SOA continues to mature and the major IT giants gradually reach consensus on the specific details of SOA, a SOA standardization organization OSOA (http: / / www.osoa.org / ) was established to be responsible for formulating SOA. The SOA...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/30H04L29/06
Inventor 高翔张滨李越新张笑楠王学建
Owner CHINA MOBILE COMM GRP CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products