Specific implementation mode
In being described below, for illustration and not for limitation, it is proposed that such as tool of particular system structure, technology etc
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention can also be realized in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
It is a kind of flow chart of Web service generation method provided in an embodiment of the present invention referring to Fig. 1, Fig. 1.In the present embodiment
The executive agent of Web service generation method is should have with the device for generating Web service function and generate Web service function
Device includes but is not limited to server.User interface control method as shown in Figure 1 may comprise steps of:
S101:Obtain the solicited message for asking establishment Web service;The solicited message includes the Web for needing to create
The information of service.
Web service is that a platform is independent, lower coupling, application program self-contained, based on programmable web,
Open extensible markup language (Extensible Markup Language, XML) standard can be used to describe, issue, send out
Now, coordinate and configure these application programs, the application program for developing distributed interoperability.Web service technology can make
The different application operated on different machines need not be by additional, special third party software or hardware, so that it may be exchanged with each other
Data are integrated.According between the application of Web service enforcement of regulations, no matter language, platform or internal agreements used in them
What is, data can be exchanged with each other.Web service is self-described, self-contained available network module, can be executed specific
Business function.Because Web service is based on some conventional industry standards and some existing technologies, such as standard generalized markup
Subset X ML, hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) under language.Web service is whole
A enterprise provides a general mechanism even more than the integrated of the operation flow between tissue, and Web service is easy deployment, and
The cost of application interface can be reduced by Web service.
With the development of network technology, network operation theory, new application integration is used a network for it has been proposed that a kind of
Solution --- Web service.Web service is a kind of new web application branch, can be executed from simple request
To any function of complicated business processing.Once after deployment, other Web service application programs can be found that and it are called to dispose
Service.Therefore, Web service be construction distributed, modular applications and state-of-the-art technology towards service application integration and
Development trend.
In present Web development processes, developer needs to have certain Web development technical experiences or programming base
Plinth could carry out corresponding Web exploitations according to exploitation demand.And during entire exploitation, developer needs first bright
Really exploitation demand builds Web service further according to exploitation demand, determines Web service finally by test and issue the service.It is this
Mode is more demanding to the technology of developer in common Web development processes, and generally require in this way compared with
The long development cycle reduces the efficiency of Web exploitations.Also, if different system respectively safeguards the service of this system, clothes can be given
Business management and service calling brings inconvenience.The present embodiment is based on multiple data sources and data class, and the various processing operations of data are led to
It crosses a kind of automation means and custom-configures and data processing operation is encapsulated to and issued into data service, to realize data service
Efficiency.
The solicited message for asking establishment Web service is obtained first.Wherein the sender of the solicited message can be one
A terminal sends the solicited message that request creates Web service by the terminal;If Web service is by multiple heterogeneous systems by dividing
The management and operation of cloth, realize the Web service, then send solicited message can also be some dress in these systems
It sets, the solicited message of Web service is created by being sent to server, so that server gets the Web service for needing to create
Information.
Wherein, solicited message includes the information for the Web service for needing to create, the including but not limited to title of Web service, work(
The information such as energy information, description.Wherein, functional information includes but not limited to the function achieved by the Web service, for example, inquiry
Function deletes function, modification function or increases function;Description include but not limited to the verbal description of the Web service or
Annotation, such as the user information of the Web service, functional information etc..
Illustratively, some terminal to server has sent one and establishes the solicited message for obtaining current weather conditions,
In, include the entitled Inquire_weather of Web service in the solicited message, functional information sends for outwardly equipment
The weather condition in some current area.By obtaining the solicited message for asking establishment Web service, Web clothes can be specified
The demand information before exploitation of business, or the desired effect in exploitation.
S102:The parameter information of the corresponding data source of the Web service is configured, and determines the inquiry item of the data source
Part;The parameter information includes the access address of the corresponding type of database of the data source, the database, the inquiry item
For part for inquiring the parameter information from the data source, the querying condition includes query argument.
Data source refers to database or database service used in database application that Web service is applied to
Device is to provide the device or original media of certain required data.Stored in data source it is all establish database connection
Information.Just as can find file in file system by designated file name, by providing correct dataSource link
Claim, is connected with finding corresponding database.Wherein, the access address of database is used to indicate the corresponding access address of database,
External device can be inquired by the access address, get data in correspondence database.
Illustratively, if the function that certain Web service is realized is the data processing field being directed in information system, often
Data source includes but not limited to:Data are observed, i.e., the measured data that scene obtains, they include field field exploring, amount
Count evidence, the observational record data of the station, telemetry etc.;Determination data is analyzed, that is, physics and chemical analysis methods is utilized to survey
Fixed data;Graph data, various topographic maps and thematic maps etc.;Survey data, various types of statistical report forms, society
Survey data etc.;Remotely-sensed data, the data obtained by ground, aviation or space remote sensing.The data source substantial amounts of China.Such as:
Nationwide land resource is checked and aberration data, aerophotogrammetric map picture and territorial survey satellite data have covered entirely
State, positioning, half positioning observation network spread all over the country, and have the mass data such as ground investigation, ground mapping.
By configuring the parameter information of the corresponding data source of Web service, to determine that the data that Web service can be got are believed
Breath and acquisition modes.Wherein, the parameter information of the data source in the present embodiment includes but not limited to:Type of database, database
Class, the access address of database, database instance name or database name, database user name and password are driven, in addition to this,
Data source information is also not quite similar according to the difference of type of database, and data source information can also include maximum number of connections and connection
Time-out time etc..Wherein, database-driven class has default value in configuration, and can be carried out accordingly more according to solicited message
Change;Maximum number of connections is used to indicate that the external world for the database that can connect to by the access address of database in synchronization to be set
Standby quantity;Connection time-out time is used to indicate that some external device to connect corresponding data by the access address of database
The time of request connection when library, if the time of request connection is more than connection time-out time, it is super to send connection to the external device
When remind so that the external device can determine the currently connection status with database as soon as possible, and carry out corresponding junction
Reason.
Further, by obtaining the table information in data source and the field information in table, the pumping to literary name section is provided
Take with self-defined screening conditions function, obtain the personalized query result to a table, and support paging.Wherein, data source
Type include but not limited to Relational DBMS (My Structure Quest Language, MYSQL),
Oracle, SQL Server, by configuring the data source compared with polymorphic type, to increase the relevance grade of data source.
In the querying condition for determining data source, screening conditions can be selected by setting, SQL can also be edited and looked into
It askes.The step for need to define query argument, including parameter name and parameter type.It, can be with preview after inquiring editor
Partial query result.It, can be in some statistical queries and in the case of with the inquiry of calculating by supporting to write SQL statement
Conveniently there is the technical staff of SQL knowledge to be more convenient, neatly obtain more complex query result, improves the exploitation effect of Web service
Rate.
S103:According to the service parameter of Web service described in the information configuration of the Web service, and establish the service ginseng
The mapping relations of number and the querying condition;The mapping relations are used to be matched to the corresponding clothes by the querying condition
Business parameter.
In the parameter information of the corresponding data source of configuration Web service, and after determining the querying condition of data source, according to
The service parameter of the information configuration Web service of Web service.Wherein, service parameter includes but not limited to the service class of Web service
The parameters such as type, service object and service data.Illustratively, in the weather for creating outwardly some current area of equipment transmission
Can be environmental information class by the type configuration of the service, service object is configured to common external device when the Web service of situation
Either terminal service data is configured to include the information such as temperature, weather, humidity, region or postcode.
By the service parameter according to the information configuration Web service of Web service, and edits web services parameter and join with inquiry
Mapping relations between number allow the service that Web service requestor gets corresponding Web service by querying condition to join
Number, to carry out the refinement of further Web service.
Illustratively, it when creating the Web service for the weather condition that outwardly equipment sends some current area, will inquire
Parameter is determined as the parameter in relation to Weather information, such as weather, and determines service corresponding with query argument weather
Parameter includes:Service type be environmental information class, service object be common external device or terminal, service data be include temperature
The information such as degree, weather, humidity, region or postcode.By determining the mapping relations between service parameter and querying condition,
It can be matched to corresponding service parameter according to querying condition, so that Web service can automatically determine the service parameter of service, keep away
The step of having exempted to generate Web service parameter by programming, improves the development efficiency of Web service.
S104:According to the parameter information of the data source, the service parameter of the Web service and the service parameter with
The mapping relations of the querying condition generate and issue the Web service.
In the service parameter and service parameter for the parameter information, Web service that data source is determined and reflecting for querying condition
It penetrates after relationship, according to the mapping of the parameter information of data source, the service parameter of Web service and service parameter and querying condition
Relationship generates simultaneously Web Services Publishing.Wherein, a Web service can generate an address of service;At least two can also be generated
A address of service, at least two addresss of service correspond to the service access protocol of mainstream respectively.Address of service is to include but not limited to
The address of Web service, for example, some information are stored in by enterprises and institutions or individual by technical finesse in a manner of page by page
On internet, all there are one corresponding addresses for every page, so that other users visit inquiry and obtain information material, such address is just
It is address of service.
Service access protocol includes but not limited to Simple Object Access Protocol (Simple Object Access
Protocol, SOAP), it is web services definition language (Web Services Description Language, WSDL), general
Description is found and integrated (Universal Description Discovery and Integration, UDDI), wherein SOAP
For describing to transmit the format of information, WSDL is used for describing how to access specific interface, and UDDI is used for managing, distributing, inquiring
Web service.External device can be called the Web service by these addresss of service according to the demand information of itself, real
Now function corresponding with demand information.
Said program, by obtaining the solicited message for asking establishment Web service;It is corresponding to configure the Web service
The parameter information of data source, and determine the querying condition of the data source;The parameter information includes that the data source corresponds to
Type of database, the database access address, according to the service of Web service described in the information configuration of the Web service
Parameter, and establish the mapping relations of the service parameter and the querying condition;The mapping relations are for passing through the inquiry
Condition coupling is to the corresponding service parameter;According to the service parameter of the parameter information of the data source, the Web service with
And the mapping relations of the service parameter and the querying condition, it generates and issues the Web service.By being created according to request
The solicited message configuration Web service of Web service is simultaneously issued, and is reduced the difficulty of Web exploitations, is had to when eliminating Web exploitations
By programming the limitation realized, the efficiency of Web exploitations is improved.
It is a kind of flow chart of Web service generation method provided in an embodiment of the present invention referring to Fig. 2, Fig. 2.In the present embodiment
The executive agent of Web service generation method is should have with the device for generating Web service function and generate Web service function
Device includes but is not limited to server.User interface control method as shown in Figure 2 may comprise steps of:
S201:Obtain the solicited message for asking establishment Web service;The solicited message includes the Web for needing to create
The information of service.
The realization method of S101 is identical in S201 embodiments corresponding with Fig. 1 in the present embodiment, specifically refers to
The associated description of S101 in the corresponding embodiments of Fig. 1, details are not described herein.
S202:The parameter information of the corresponding data source of the Web service is configured, and determines the inquiry item of the data source
Part;The parameter information includes the access address of the corresponding type of database of the data source, the database, the inquiry item
For part for inquiring the parameter information from the data source, the querying condition includes query argument.
Specifically, the parameter information for configuring the corresponding data source of the Web service, and determine the data source
Querying condition, including:
Configure the parameter information of the corresponding data source of the Web service;
The access address of the database is verified;
If verification passes through, it is determined that the querying condition of the data source.
The parameter information of data source in the present embodiment includes but not limited to:Type of database, database-driven class, data
The access address in library, database instance name or database name, database user name and password.Except the above necessary data source category
Property outside, some common data source properties can also be configured, these data source properties include but not limited to following:
It is automatic to submit connection attribute defaultAutoCommit, for indicating whether the connection returned from data source adopts
With automatic Committing Mechanism, default value true;
Data source read-only operation attribute defaultReadOnly, for indicating whether data source is only capable of executing read-only operation,
Default value is false;
Maximum number of connections connects number maxActive according to library, when being set as 0, indicates that there is no limit;
Maximum waits for the quantity maxIdle in connection, when being set as 0, indicates that there is no limit;
Maximum waits for number of seconds maxWait, and unit is millisecond, and error message can be quoted more than the time;
Self interrupts attribute removeAbandoned, and acquiescence is false.
In addition to this it is possible to according to the demand information of Web service itself, to determine the corresponding data source of Web service
Parameter type and its corresponding parameter.It is configured by the parameter information to data source, to determine that Web service can be got
Data information and acquisition modes, provide data basis for the generation and publication of Web service.
Since each data source is corresponding with the access address of database, configuring the corresponding data of Web service
After the parameter information in source, the access address of the corresponding database of data source is verified.Wherein, the parameter information of data source
Including data source name (Data Source Name, DSN), DSN is to contain the data in relation to some certain database information
Structure, this information are that open database inter connection driving is connectable to required information on database.DSN is stored in registration
Table or as an individual text file, the information for including inside DSN has title, catalogue and data base driver, Yi Jiyong
Family ID and password.Developer is that each database creates an independent DSN.In order to be connected to some database, exploit person
Member needs to specify DSN in a program.On the contrary, the connection of DSN does not need then to specify institute's necessary information in a program.
When the access address to database verifies, can be connected according to the access address of database by detecting whether
Data source is connect, if data source can be connected by the access address of database, then it represents that verification passes through, and determines the inquiry item of data source
Part.
Optionally, by determining that screening conditions, editor's SQL statement determine the querying condition of data source.It has been edited in inquiry
Bi Hou, can be with preview part query result.By supporting to write SQL statement, in some statistical queries and with the inquiry of calculating
In the case of, can conveniently there be the technical staff of SQL knowledge to be more convenient, neatly obtain more complex query result, improve Web
The development efficiency of service.
S203:According to the service parameter of Web service described in the information configuration of the Web service, and establish the service ginseng
The mapping relations of number and the querying condition;The mapping relations are used to be matched to the corresponding clothes by the querying condition
Business parameter.
In the parameter information of the corresponding data source of configuration Web service, and after determining the querying condition of data source, according to
The service parameter of the information configuration Web service of Web service.Wherein, service parameter includes but not limited to the service class of Web service
The parameters such as type, service object and service data.By the service parameter according to the information configuration Web service of Web service, and compile
Mapping relations volume between web services parameter and query argument allow Web service requestor to be got pair by querying condition
The service parameter for the Web service answered, to carry out the refinement of further Web service.
Further, according to the service parameter of Web service described in the information configuration of the Web service, and the clothes are established
After parameter of being engaged in and the mapping relations of the querying condition, further include:
The security strategy of the Web service is set.
With the birth of the internet product of a series of new such as Web2.0, social networks and microblogging, it is based on Web environment
The Internet, applications it is more and more extensive, during IT application in enterprises it is various application be all erected on Web platforms, Web service
The strong interest for also causing hackers is rapidly developed, what is come one after another is exactly highlighting for Web security threats, and hacker is grasped using website
Make the loophole of system and the SQL injection loophole of Web service program etc. and obtain the control authority of Web server, gently then distorts webpage
Content, heavy then steal important internal data, even more serious is then that malicious code is implanted into webpage so that website caller by
To infringement.Therefore it needs that security strategy is arranged to Web service, to improve the safety of Web service.
Wherein, the security strategy of Web service includes but not limited to configuration access permission or is carried out to the data of Web service
Encryption.Wherein, access rights include but not limited to according to the identity of user and its member's body in various predefined groups
Part accesses certain items of information or certain controls to limit.Access control usually is used for controlling customer access network by system manager
The access of resource (such as server, catalogue and file), and the permission of special object is usually accessed by being authorized to user and group
To realize.
Illustratively, when the data to Web service are encrypted, using to the encrypted plan of partial data in XML file
Slightly, as long as client and server-side appoint a kind of algorithm of encryption and decryption, in addition key appropriate can, this safe plan
It is fairly simple efficient if being slightly arranged;The data transmitted can also be ensured not by third party's malicious modification by digital signature
It crosses.When the user volume of especially Web service is more, come the danger for avoiding data from being tampered;The plan of eap-message digest can also be used
Slightly, the danger for preventing data that may be tampered improves the safety of data access.
Further, described according to the parameter information of the data source, the service parameter of the Web service, the service
Parameter is also wrapped with the mapping relations of the querying condition and the security strategy after generating and issuing the Web service
It includes:
According to the address of service of the Web service and the service parameter, the Web service is tested;
If the test result of the Web service is consistent with the functional information, display is for indicating the Web service hair
The successful prompting message of cloth.
In the service parameter and service parameter for the parameter information, Web service that data source is determined and reflecting for querying condition
Penetrate relationship, and after carrying out corresponding security configuration to Web service, according to the address of service of the Web service configured before and
Whether service parameter is called Web service, to test the Web service can be with normal operation.
If the test result of Web service is consistent with functional information, then it represents that the Web service after configuring is solicited message pair
The Web service answered, then display is for indicating that Web service issues successful prompting message.If the test result and function of Web service
Information is inconsistent, then according to the error information of test result, inquires specific problem source, and carries out modification accordingly or again
Configuration, to ensure that Web service can be generated normally.
S204:According to the parameter information of the data source, the service parameter of the Web service, the service parameter and institute
The mapping relations of querying condition and the security strategy are stated, generate and issues the Web service.
The realization method of S104 is identical in S204 embodiments corresponding with Fig. 1 in the present embodiment, specifically refers to
The associated description of S104 in the corresponding embodiments of Fig. 1, details are not described herein.
S205:According to the information of the address of service and the Web service, service management list is established;The service pipe
Reason list is for carrying out the Web service unified management.
After the Web service after generating concurrent cloth setting security strategy, according to the letter of address of service and Web service
Breath, establishes service management list, carries out unified management to Web service by the service management list.
Further, the user interface for configuring, testing or managing Web service can be set, so that developer can
Directly, easily to be configured, tested or be managed to Web service by the user interface, Web service is greatly improved
The efficiency for generating and issuing, and can realize the unified configuration and management of Web service.Especially in isomery or distributed system
In, the unified configuration of Web service and management between multiple devices can greatly improve the efficiency that Web service is generated and issued.
Said program, by obtaining the solicited message for asking establishment Web service;It is corresponding to configure the Web service
The parameter information of data source;The access address of the database is verified;If verification passes through, it is determined that the data source
Querying condition;And the mapping relations of the service parameter and the querying condition of Web service are established, to pass through the querying condition
It is fitted on the corresponding service parameter;According to the parameter information of the data source, the service parameter of the Web service and described
The mapping relations of service parameter and the querying condition generate and issue the Web service;According to the address of service and described
The information of Web service establishes service management list, is managed collectively to the Web service with realizing, especially in isomery or
In the distributed system of person, the unified configuration of Web service and management between multiple devices can greatly improve Web service and generate and send out
The efficiency of cloth.
It is a kind of schematic diagram of Web service generating means provided in an embodiment of the present invention referring to Fig. 3, Fig. 3.Web service is given birth to
Can be that should include but not with the device for generating Web service function with the device for generating Web service function at device 300
It is defined in server.The each unit that the Web service generating means 300 of the present embodiment include is for executing the corresponding embodiments of Fig. 1
In each step do not repeated herein referring specifically to the associated description in the corresponding embodiments of Fig. 1 and Fig. 1.The present embodiment
Web service generating means 300 include solicited message acquiring unit 301, data source parameter unit 302, service parameter unit 303 with
And service release unit 304.
Solicited message acquiring unit 301, for obtaining the solicited message for asking establishment Web service;The request letter
Breath includes the information for the Web service for needing to create;
Data source parameter unit 302, the parameter information for configuring the corresponding data source of the Web service, and determine
The querying condition of the data source;The parameter information includes the corresponding type of database of the data source, the database
Access address, the querying condition include inquiry for inquiring the parameter information, the querying condition from the data source
Parameter;
Service parameter unit 303, for the service parameter of Web service described in the information configuration according to the Web service, and
Establish the mapping relations of the service parameter and the querying condition;The mapping relations by the querying condition for being matched
To the corresponding service parameter;
Service release unit 304, for according to the service parameter of the parameter information of the data source, the Web service with
And the mapping relations of the service parameter and the querying condition, it generates and issues the Web service.
Said program, by obtaining the solicited message for asking establishment Web service;It is corresponding to configure the Web service
The parameter information of data source, and determine the querying condition of the data source;The parameter information includes that the data source corresponds to
Type of database, the database access address, according to the service of Web service described in the information configuration of the Web service
Parameter, and the mapping relations of the service parameter and the querying condition are established, to be matched to correspondence by the querying condition
The service parameter;According to the parameter information of the data source, the service parameter of the Web service and the service parameter
With the mapping relations of the querying condition, generates and issue the Web service.By the request for creating Web service according to request
Information configuration Web service is simultaneously issued, and the difficulty of Web exploitations is reduced, and is had to when eliminating Web exploitations by programming realization
Limitation improves the efficiency of Web exploitations.
It is a kind of schematic diagram of Web service generating means provided in an embodiment of the present invention referring to Fig. 3, Fig. 3.Web service is given birth to
Can be that should include but not with the device for generating Web service function with the device for generating Web service function at device 400
It is defined in server.The each unit that the Web service generating means 400 of the present embodiment include is for executing the corresponding embodiments of Fig. 1
In each step do not repeated herein referring specifically to the associated description in the corresponding embodiments of Fig. 1 and Fig. 1.The present embodiment
Web service generating means 400 include solicited message acquiring unit 401, data source parameter unit 402, service parameter unit 403,
Service release unit 404 and service managing unit 405.
Solicited message acquiring unit 401, for obtaining the solicited message for asking establishment Web service;The request letter
Breath includes the information for the Web service for needing to create;
Data source parameter unit 402, the parameter information for configuring the corresponding data source of the Web service, and determine
The querying condition of the data source;The parameter information includes the corresponding type of database of the data source, the database
Access address, the querying condition include inquiry for inquiring the parameter information, the querying condition from the data source
Parameter;
Service parameter unit 403, for the service parameter of Web service described in the information configuration according to the Web service, and
Establish the mapping relations of the service parameter and the querying condition;The mapping relations by the querying condition for being matched
To the corresponding service parameter;
Service release unit 404, for according to the service parameter of the parameter information of the data source, the Web service with
And the mapping relations of the service parameter and the querying condition, it generates and issues the Web service.
Service managing unit 405 establishes service management for the information according to the address of service and the Web service
List;The service management list is for carrying out the Web service unified management.
Specifically, data source parameter unit 402 further includes:
Data source parameter dispensing unit, the parameter information for configuring the corresponding data source of the Web service;
Database address verification unit is verified for the access address to the database;
Querying condition determination unit, if passing through for verifying, it is determined that the querying condition of the data source.
The Web service generating means 400 further include:
Security strategy setting unit, the security strategy for the Web service to be arranged.
The Web service generating means 400 further include:
Web service test cell is used for the address of service according to the Web service and the service parameter, to the Web
Service is tested.
Web service dispensing unit is shown if the test result for the Web service is consistent with the functional information
For indicating that the Web service issues successful prompting message.
Said program, by obtaining the solicited message for asking establishment Web service;It is corresponding to configure the Web service
The parameter information of data source;The access address of the database is verified;If verification passes through, it is determined that the data source
Querying condition;And the mapping relations of the service parameter and the querying condition of Web service are established, to pass through the querying condition
It is fitted on the corresponding service parameter;According to the parameter information of the data source, the service parameter of the Web service and described
The mapping relations of service parameter and the querying condition generate and issue the Web service;According to the address of service and described
The information of Web service establishes service management list, is managed collectively to the Web service with realizing, especially in isomery or
In the distributed system of person, the unified configuration of Web service and management between multiple devices can greatly improve Web service and generate and send out
The efficiency of cloth.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
It is a kind of schematic diagram generating equipment for Web service that yet another embodiment of the invention provides referring to Fig. 5, Fig. 5.Such as
In the present embodiment shown in fig. 5 for Web service generate equipment 500 may include:It processor 501, memory 502 and deposits
Store up the computer program 503 that can be run in memory 502 and on processor 501.Processor 501 executes computer program
Above-mentioned each step in Web service generation method embodiment is realized when 503.Memory 502 is for storing computer journey
Sequence, the computer program include program instruction.Processor 501 is used to execute the program instruction of the storage of memory 502.Wherein,
Processor 501 is configured for that described program instruction execution or less is called to operate:
Processor 501 is used to obtain the solicited message for asking establishment Web service;The solicited message includes needing to create
The information for the Web service built;
Processor 501 is additionally operable to configure the parameter information of the corresponding data source of the Web service, and determines the data
The querying condition in source;The parameter information includes the access address of the corresponding type of database of the data source, the database,
For the querying condition for inquiring the parameter information from the data source, the querying condition includes query argument;
Processor 501 is additionally operable to the service parameter of Web service described in the information configuration according to the Web service, and establishes
The mapping relations of the service parameter and the querying condition;The mapping relations are used to be matched to pair by the querying condition
The service parameter answered;
Processor 501 is additionally operable to the parameter information according to the data source, the service parameter of the Web service and described
The mapping relations of service parameter and the querying condition generate and issue the Web service.
Processor 501 is specifically used for configuring the parameter information of the corresponding data source of the Web service;
Processor 501 is specifically used for verifying the access address of the database;
Pass through if processor 501 is specifically used for verification, it is determined that the querying condition of the data source.
Processor 501 is specifically used for that the security strategy of the Web service is arranged;
Processor 501 is specifically used for the service parameter, described according to the parameter information of the data source, the Web service
Mapping relations and the security strategy of the service parameter with the querying condition, generate and issue the Web service.
Processor 501 is specifically used for the address of service according to the Web service and the service parameter, is taken to the Web
Business is tested.
If the test result that processor 501 is specifically used for the Web service is consistent with the functional information, display is used for
Indicate that the Web service issues successful prompting message.
Processor 501 is specifically used for the information according to the address of service and the Web service, establishes service management row
Table;The service management list is for carrying out the Web service unified management.
Said program, by obtaining the solicited message for asking establishment Web service;It is corresponding to configure the Web service
The parameter information of data source;The access address of the database is verified;If verification passes through, it is determined that the data source
Querying condition;And the mapping relations of the service parameter and the querying condition of Web service are established, to pass through the querying condition
It is fitted on the corresponding service parameter;According to the parameter information of the data source, the service parameter of the Web service and described
The mapping relations of service parameter and the querying condition generate and issue the Web service;According to the address of service and described
The information of Web service establishes service management list, is managed collectively to the Web service with realizing, especially in isomery or
In the distributed system of person, the unified configuration of Web service and management between multiple equipment can greatly improve Web service and generate and send out
The efficiency of cloth.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at
It can also be any conventional processor etc. to manage device.
The memory 502 may include read-only memory and random access memory, and to processor 501 provide instruction and
Data.The a part of of memory 502 can also include nonvolatile RAM.For example, memory 502 can also be deposited
Store up the information of device type.
In the specific implementation, processor 501 described in the embodiment of the present invention, memory 502, computer program 503 can
The first embodiment for executing Web service generation method provided in an embodiment of the present invention and the realization side described in second embodiment
Formula also can perform the realization method of terminal described in the embodiment of the present invention, and details are not described herein.
A kind of computer readable storage medium, the computer-readable storage medium are provided in another embodiment of the invention
Matter is stored with computer program, and the computer program includes program instruction, and described program instruction is realized when being executed by processor:
Obtain the solicited message for asking establishment Web service;The solicited message includes the Web service for needing to create
Information;
The parameter information of the corresponding data source of the Web service is configured, and determines the querying condition of the data source;Institute
The access address that parameter information includes the corresponding type of database of the data source, the database is stated, the querying condition is used
In inquiring the parameter information from the data source, the querying condition includes query argument;
According to the service parameter of Web service described in the information configuration of the Web service, and establish the service parameter and institute
State the mapping relations of querying condition;The mapping relations, which are used to be matched to the corresponding service by the querying condition, joins
Number;
According to the parameter information of the data source, the service parameter of the Web service and the service parameter with it is described
The mapping relations of querying condition generate and issue the Web service.
Further, it is also realized when the computer program is executed by processor:
Configure the parameter information of the corresponding data source of the Web service;
The access address of the database is verified;
If verification passes through, it is determined that the querying condition of the data source.
Further, it is also realized when the computer program is executed by processor:
The security strategy of the Web service is set;
Further, it is also realized when the computer program is executed by processor:
According to the parameter information of the data source, the service parameter of the Web service, the service parameter and the inquiry
The mapping relations of condition and the security strategy generate and issue the Web service.
Further, it is also realized when the computer program is executed by processor:
According to the address of service of the Web service and the service parameter, the Web service is tested.
If the test result of the Web service is consistent with the functional information, display is for indicating the Web service hair
The successful prompting message of cloth.
Further, it is also realized when the computer program is executed by processor:
According to the information of the address of service and the Web service, service management list is established;The service management list
For carrying out unified management to the Web service.
Said program, by obtaining the solicited message for asking establishment Web service;It is corresponding to configure the Web service
The parameter information of data source;The access address of the database is verified;If verification passes through, it is determined that the data source
Querying condition;And the mapping relations of the service parameter and the querying condition of Web service are established, to pass through the querying condition
It is fitted on the corresponding service parameter;According to the parameter information of the data source, the service parameter of the Web service and described
The mapping relations of service parameter and the querying condition generate and issue the Web service;According to the address of service and described
The information of Web service establishes service management list, is managed collectively to the Web service with realizing, especially in isomery or
In the distributed system of person, the unified configuration of Web service and management between multiple equipment can greatly improve Web service and generate and send out
The efficiency of cloth.
The computer readable storage medium can be the internal storage unit of the equipment described in aforementioned any embodiment, example
Such as the hard disk or memory of equipment.The computer readable storage medium can also be the External memory equipment of the equipment, such as
The plug-in type hard disk being equipped in the equipment, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, the computer readable storage medium can also be wrapped both
The internal storage unit for including the equipment also includes External memory equipment.The computer readable storage medium is described for storing
Other programs needed for computer program and the equipment and data.The computer readable storage medium can be also used for temporarily
Ground stores the data that has exported or will export.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, depend on the specific application and design constraint of technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, foregoing description is set
Standby and unit specific work process, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, apparatus embodiments described above are merely indicative, for example, the division of the unit, only
Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.In addition, shown or discussed phase
Coupling, direct-coupling or communication connection between mutually can be INDIRECT COUPLING or the communication by some interfaces, equipment or unit
Connection can also be electricity, mechanical or other form connections.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the embodiment of the present invention
Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, can also be during two or more units are integrated in one unit.It is above-mentioned integrated
The form that hardware had both may be used in unit is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (Read-Only Memory,
ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can store program
The medium of code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection domain subject to.