A kind of method and system of call capability service
Technical field
The invention belongs to the WEB technical field of service calling, relate in particular to a kind of method and system of quick calling capability service.
Background technology
Traditionally, we are the function that computer background program (Daemon) provides, and are called that " service " (service).Such as, allow an antivirus software at running background, its can automatic monitored control system, so this automatic monitoring be exactly one " service ".Generally, " service " is exactly a certain function that computer can provide.According to the difference in source, " service " can be divided into again two kinds: a kind of is local service, and the service of namely using same machine to provide does not need network.Another kind is network service (Web Service), and the service of namely using another computer to provide must just can be finished by network.
UDDI(Universal Description Discovery and Integration, namely unify description, discovery and integrated protocol) be a distributed Internet service login mechanism, it integrates description (Universal Description), retrieval (Discovery) and integrated (Integration), and its core is login mechanism.UDDI has realized the one group of interface that can openly access, and by these interfaces, capability service can be registered its information on services to service information repository, demand for services person can find the capability service that is dispersed in all over the world.UDDI also is the integrated individual system framework of Web service simultaneously.It has comprised the standard criterion of service describing and discovery.The UDDI standard has been utilized W3C(World Wide Web Consortium, World Wide Web Consortium) and IETF (Internet Engineering Task Force, Internet engineering duty tissue) a lot of standards realize the basis as it, such as expansion mark language (XML), these agreements of HTTP and domain name service (DNS).
At present, value added service of digital television on stream, can be by generating client code call capability service (so-called capability service, refer to the online application service of finishing its specific business needs by enterprise's issue, other companies or application software can visit and use this online service by Internet, it includes but not limited to the Service with Web, JS(javascript, it is an embedded language, that webpage is realized some special efficacy goods functions and some scripts of writing), API(Application Programming Interface, application programming interface) service that provides of mode such as), also can hand-written JS code call capability service.If will there be a large amount of duplication of labour in hand-written JS code call, therefore, how the developer is freed from a large amount of duplication of labour, for operator or the maximum value of content supplier's creation, become urgent problem.
Summary of the invention
The object of the present invention is to provide a kind of method of quick calling UDDI capability service, be intended to solve the problem of calling in the existing method slowly, having a large amount of overlapping development.
The present invention is achieved in that a kind of method of call capability service, may further comprise the steps: the instruction of receiving ability services selection; According to described capability service selection instruction, generate UDDI service configuration guide information; According to described UDDI service configuration guide information, allocative abilities service parameter; According to the capability service parameter of described service configuration guide information and configuration, generative capacity service call code and/or displaying code.
More excellent, further comprise step before the instruction of described ability to accept services selection: the capability service information of all UDDI registration centers is to local synchronously.
More excellent, described synchronously all UDDI capability service information further comprised step before local step: dispose UDDI capability service address.
More excellent, described capability service parameter according to described service configuration guide and configuration, also comprise step after the step of generative capacity service call code and/or displaying code: generate HTML HTML example, and the HTML HTML example of showing described generation.
More excellent, described capability service comprises the service of network service or API or JS mode.
More excellent, described service configuration guide information comprises: the ability exhibition information of the address information of service, service.
More excellent, the ability exhibition information of described service comprises: the parameter configuration of the method call information of Service Description information, service, the method descriptive information of service, service, the invoke code information of service.
More excellent, the parameter configuration of described service comprises: input/output parameters information.
Another object of the present invention is to provide a kind of system of call capability service, described system comprises:
The command reception module is used for the instruction of receiving ability services selection; The configuration wizard information generating module is used for according to described capability service selection instruction, generates UDDI service configuration guide information; Parameter configuration module is used for according to described UDDI service configuration guide information, allocative abilities service parameter; Code generation module is used for the capability service parameter according to described service configuration guide information and configuration, generative capacity service call code and/or displaying code.
More excellent, described system also comprises: the information on services synchronization module, being used for synchronously, the capability service information of all UDDI registration centers arrives local.
More excellent, described system further comprises: capability service address configuration module is used for configuration UDDI capability service address.
More excellent, described system further comprises: example generates and display module, is used for generating HTML HTML example, and the HTML HTML example of showing described generation.
Technical scheme disclosed in this invention can realize having saved the development time by UDDI quick calling capability service, has shortened the construction cycle, and has avoided overlapping development, has good effect.
Description of drawings
Fig. 1 is the flow chart of the call capability method of servicing that provides of first embodiment of the invention;
Fig. 2 is the flow chart of the call capability method of servicing that provides of another embodiment of the present invention;
Fig. 3 is capability component case client utility interface schematic diagram in the call capability method of servicing that provides of third embodiment of the invention;
Capability service URL configuration interface schematic diagram in the call capability method of servicing that Fig. 4 provides for third embodiment of the invention;
Capability service is showed the interface schematic diagram in the call capability method of servicing that Fig. 5 provides for third embodiment of the invention;
The capability service parameter arranges the interface schematic diagram in the call capability method of servicing that Fig. 6 provides for third embodiment of the invention;
Capability service invoke code interface schematic diagram in the call capability method of servicing that Fig. 7 provides for third embodiment of the invention;
Fig. 8 is the system architecture diagram of the disclosed call capability service of the embodiment of the invention;
The structured flowchart that provides of the disclosed call capability service of another embodiment of the present invention is provided Fig. 9.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
Embodiment one.See also Fig. 1, the flow chart of the quick calling capability service method that provides for the embodiment of the invention for convenience of explanation, has only been listed the part relevant with present embodiment.
The method of the quick calling capability service that first embodiment of the invention provides comprises:
Step S30: receiving ability services selection instruction.The user can by the instruction inputting interface, select or specify title or the address of needed capability service." capability service " herein comprises WEB SERVICE(network service), also comprise the service of API or JS mode.
Step S50: according to described capability service selection instruction, generate UDDI service configuration guide information.In this step, the capability component case ejects selected capability service guide information, and the address information of service, the ability exhibition information of service etc. are showed the user.
Step S70: according to described UDDI service configuration guide information, allocative abilities service parameter.In this step, the user is according to the service configuration guide information of showing among the step S60, and editor is the instruction of input configuration UDDI capability service also; System disposes network services according to instruction.Concrete, the user can enter the URL(Uniform of capability service/Universal Resource Locator by client end capacity module case instrument, and web page address is also referred to as URL(uniform resource locator)) configuration interface; After the user enters the URL configuration interface, can dispose a plurality of UDDI service, comprise the information such as title, address of each UDDI service.Service can be weather service, stock information, shopping information etc. such as UDDI.
Step S90: according to the capability service parameter of described service configuration guide information and configuration, generative capacity service call code and/or displaying code.In this step, module case will be according to descriptor and the parameter configuration of capability service, the JS source code of this service is called in generation, the user can be drawn to the JS source code in corresponding IDE or the text editor, instrument will generate the JS source code at IDE or text editor relevant position, can become the part in this software project engineering, be convenient to the fast Development software program.
Further, before the step S30 of the first embodiment, further comprise step S20: the capability service information of all UDDI registration centers is to local synchronously.In this step, the capability component case can be synchronized to this locality with all information on services in the UDDI address of service automatically.
Further, before the step S20 of above-described embodiment, further comprise step S10: configuration UDDI capability service address.This step specifically comprises: receive the instruction of configuration UDDI capability service; According to described instruction, the configuration network services.The user can enter the URL(Uniform of capability service/Universal Resource Locator by client end capacity module case instrument, and web page address is also referred to as URL(uniform resource locator)) configuration interface; After the user enters the URL configuration interface, can dispose a plurality of UDDI service, comprise the information such as title, address of each UDDI service.Service can be weather service, stock information, shopping information etc. such as UDDI.Simultaneously, can also select to arrange the UDDI that disposes and serve whether automatic synchronization is to local.In the present embodiment, recommend to arrange UDDI service automatic synchronization that selection disposes to local.
Further, can further include step S100 behind the step S90: generate HTML HTML example, and the HTML HTML example of showing described generation.In this step, the user can intuitively see the exhibition information directly perceived of the UDDI capability service of calling.
Embodiment three, below in conjunction with Fig. 3-Fig. 7, the method for call capability service disclosed by the invention added a concrete explanation.
At first, if the user need to dispose certain capability service, the user can access first in capability component case instrument (see figure 3), " URL configuration " menu in " configuration " on the selective power module case instrument, at this moment, system can forward the capability service URL configuration interface (see figure 4) of capability component case instrument to, the user can dispose a plurality of UDDI address of service at the URL configuration interface, such as, can dispose the address field http://www.coship.com of Shenzhen Coship Electronics Co., Ltd UDDI service initialization, simultaneously, under " automatic synchronization " indication hurdle, choose, expression user selection ability to accept module case instrument is that all service synchronization among the http://www.coship.com are resolved the (descriptor that comprises service to this locality and to service automatically with the URL address, method and descriptor thereof that service provides, and the input/output information of method etc.).
One of them service of user selection, such as selecting weather, then the capability component case ejects capability service guide (see figure 5), will represent the descriptor of service, method and descriptor thereof that service provides, and the input/output information of method etc.
The user enters the parameter configuration interface (see figure 6) parameter is configured, enter invoke code interface (see figure 7), module case will be according to descriptor and the parameter configuration of service, the JS source code of this service is called in generation, the user can be drawn to the JS source code in corresponding IDE or the text editor, instrument will generate the JS source code at IDE or text editor relevant position, can become the part in this software project engineering, be convenient to the fast Development software program.
Another object of the present invention is to provide a kind of system of call capability service, below in conjunction with accompanying drawing 8, the system of call capability service disclosed by the invention is described.As shown in Figure 8, the system of call capability service disclosed in this invention comprises
Command reception module 30 is used for the instruction of receiving ability services selection; Configuration wizard information generating module 50 is used for according to described capability service selection instruction, generates UDDI service configuration guide information; Parameter configuration module 70 is used for according to described UDDI service configuration guide information, allocative abilities service parameter; Code generation module 90 is used for the capability service parameter according to described service configuration guide information and configuration, generative capacity service call code and/or displaying code.
See also Fig. 9, further, described system also comprises: information on services synchronization module 20, being used for synchronously, the capability service information of all UDDI registration centers arrives local.
Further, described system also comprises: capability service address configuration module 10 is used for configuration UDDI capability service address; Example generates and display module 100, is used for generating HTML HTML example, and the HTML HTML example of showing described generation.
The above only is preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.