Summary of the invention
The invention provides the cooperative processing method between a kind of service application and system, interface exploitation cost can be reduced.
Cooperative processing method between a kind of service application, for each service application extracts interface component, be stored in being used for providing the interface component of interface in the interface provider component registration table pre-set, and by the interface user component registration table that is used for using the interface component of interface to be stored in pre-setting; Also comprise:
The service application of interface user finds the interface component that will call in described interface provider component registration table, and line interface of going forward side by side calls, and pushes information to the service application of interface provider;
Find the interface component that will call in the registration table of interface user component described in the service application of described interface provider, line interface of going forward side by side calls, and information processing result is pushed to the service application of described interface user.
Preferably, the entering ginseng and go out ginseng for according to the parameter of the character string type of XML format tissue of each interface component described;
Described information or information processing result are XML format.
Wherein, the information in described component registration table comprises: component ID, component name, business operation ID, business operation title, the side of operation ID, component version and one or more in component date issued.
Wherein, the described interface component that will call that finds in registration table comprises: according to business operation ID and component version, find the interface component that will call in registration table.
Preferably, when business provider needs to provide service application, in the interface provider component registration table providing the interface component of interface to be stored in pre-set being used for described in execution;
When business user needs to use service application, in the interface user component registration table using the interface component of interface to be stored in pre-set being used for described in execution;
And comprise further:
The interface component of correspondence, for current untapped interface, is deleted by described business provider from interface provider component registration table;
The interface component of correspondence, for current untapped interface, is deleted by described business user from interface user component registration table.
A coprocessing system between service application, comprising:
Database, for saving interface provider component registration table and interface user component registration table, wherein, preserving the interface component of the service application for providing interface in described interface provider component registration table, in described interface user component registration table, preserving the interface component of the service application for using interface;
Interface user traffic application device, in the described interface provider component registration table of described database, find the interface component that will call, line interface of going forward side by side calls, and pushes information to the traffic application device of interface provider;
The traffic application device of interface provider, in the described interface user component registration table of described database, find the interface component that will call, line interface of going forward side by side calls, and information processing result is pushed to the service application of described interface user.
Preferably, in described database, the entering ginseng and go out ginseng for according to the parameter of the character string type of XML format tissue of each interface component described;
The described information of described interface provider traffic application device and the mutual XML format of described interface user traffic application device and information processing result.
Wherein, in described database, the information in component registration table comprises: component ID, component name, business operation ID, business operation title, the side of operation ID, component version and one or more in component date issued.
Wherein, described interface provider traffic application device and described interface user traffic application device, according to business operation ID and component version, find the interface component that will call in the registration table of described database.
Preferably, described interface provider traffic application device is when needs provide service application, in the interface provider component registration table providing the interface component of interface to be stored in pre-set being used for described in execution, and further for current untapped interface, the component of correspondence is deleted from interface provider component registration table;
Described interface user traffic application device is when needs use service application, in the interface user component registration table using the interface component of interface to be stored in pre-set being used for described in execution, and further for current untapped interface, the component of correspondence is deleted from interface user component registration table.
Visible, the interface routine code that the embodiment of the present invention uses when can miscellaneous service application mutually be called in advance is taken into each interface component, issue based on interface component registration, interface provider component registration table and interface user component registration table is divided into according to function, unify interface interchange mode, namely from preformed component registration table, required interface component is searched, therefore, greatly reduce interface exploitation cost, without the need to service application user, there is specific language compilation and call capability, reduce the complexity of business realizing.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described.Obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
One embodiment of the invention proposes the cooperative processing method between a kind of service application, and see Fig. 1, the method comprises:
Step 101: in advance for each service application extracts interface component.
Step 102: be stored in being used for providing the interface component of interface in the interface provider component registration table pre-set.
Step 103: be stored in being used for using the interface component of interface in the interface user component registration table pre-set.
Step 104: the service application of interface user finds the interface component that will call in described interface provider component registration table, and line interface of going forward side by side calls, and pushes information to the service application of interface provider.
Step 105: find the interface component that will call in the registration table of interface user component described in the service application of described interface provider, line interface of going forward side by side calls, and information processing result is pushed to the service application of described interface user.
Visible, the interface routine code that the embodiment of the present invention uses when can miscellaneous service application mutually be called in advance is taken into each interface component, issue based on interface component registration, interface provider component registration table and interface user component registration table is divided into according to function, unify interface interchange mode, namely from preformed component registration table, required interface component is searched, therefore, greatly reduce interface exploitation cost, without the need to service application user, there is specific language compilation and call capability, reduce the complexity of business realizing.
In embodiments of the present invention, in order to reach the message informing method used in the process of interoperability requirement between cooperative system, the message sink component that interface provider calling interface user provides realizes the Message Transmission in collaborative processes to interface user, interface user makes respective feedback action by message sink component, thus realizes collaborative object.
The embodiment of the present invention efficiently solves operation system intermodule and to interdepend the decoupling problem called, and improves stability and the extendability of intersystem interface.
The embodiment of the present invention can also support plug-in, that is, when business provider needs to provide service application, in the interface provider component registration table providing the interface component of interface to be stored in pre-set being used for described in execution; When business user needs to use service application, described in the interface user component registration table using the interface component of interface to be stored in pre-set being used for described in execution, business provider is for current untapped interface, the interface component of correspondence is deleted from interface provider component registration table; The interface component of correspondence, for current untapped interface, is deleted by described business user from interface user component registration table.Visible, the embodiment of the present invention is when needs carry out interface interchange just in registration table in registration, and for the interface do not used, then directly can delete from registration table and need not revise the code of interface both sides, support plug-in, greatly reduces interface maintenance cost.
Fig. 2 is the process flow diagram of the associated treatment realized in another embodiment of the present invention between service application.See Fig. 2, Fig. 3 and Fig. 4, this process comprises:
Step 201: for each service application extracts interface component.
In this step, entering ginseng and going out ginseng of each interface component can for the parameter according to the character string type of XML format tissue.Adopt XML format character string as data interchange format, good expansion can be carried out according to business demand, make it have more readability, and can be integrated in application system easily.
Step 202: pre-set interface provider component registration table, and pre-set interface user component registration table.
Step 203: when business provider needs to provide a kind of service application such as service application A, will correspond to the interface provider component registration table being used for providing the interface component of interface to be stored in pre-setting of this service application A.
Step 204: when business user needs to use service application such as service application A, will correspond in the interface user component registration table being used for using the interface component of interface to be stored in pre-setting of this service application A.
In above-mentioned steps 203 and step 204, the information in interface provider component registration table and interface user component registration table can comprise: component ID, component name, business operation ID, business operation title, the side of operation ID, component version and one or more in component date issued.
A kind of specific implementation of this step can comprise:
First, business component definition information is inserted into the interface provider component registration table in database by business interface provider, and be designated as in GSPCOMPONENTFACTORY table, example is as follows:
/ * * * * * * * * * * * * * * cash management insertion payment application list component * * * * * * * * * * * * * * * * * */
INSERT INTO GSPCOMPONENTFACTORY(COMPONENTID,COMPONENTCODE,COMPONENTNAME,COMPONENTTYPE,RUNATSERVER,MODIFYTIME,COMPONENTCATALOG,DESCRIPTION,XMLFRAGMENT)
VALUES (' TRCRFKSQ', ' InsertPaymentApp', ' cash management insertion payment application list ', ' DotNet', ' 1', ", ' GSP0101'; ' cash management insertion payment application list ', ' <? xml version=" 1.0 " encoding=" utf-16 "? >
<GSPComponent xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd="http://www.w3.org/2001/XMLSchema"ComponnetType="DotNet">
<DotNet Assembly="Genersoft.QYZJ.TR.LocalClient"
ClassName="Genersoft.QYZJ.TR.LocalClient.TRClient"
MethodName="PaymentsAppInsert">
<FormalParameters>
<FormalParameter Code=" appSourceInfo " Name=" payment application list information " Mode=" IN " Type=" System.String "/>
<FormalParameter Code=" resultInfo " Name=" object information " Mode=" OUT " Type=" System.String "/>
</FormalParameters>
</DotNet>
</GSPComponent>')
GO
Secondly, business component log-on message is inserted in database by business interface provider, and list structure is as follows:
Example is as follows: online reimbursement Module registers component
Points for attention:
LSCOMPONENTINVOKE_YWLYID row will with show toward business take over party in the request slip business inserted column data of originating consistent, as with the application in cash management payment application list table originate arrange consistent.
LSCOMPONENTINVOKE_GJID row will arrange consistent with the ID in GSPCOMPONENTFACTORY piece table.
LSCOMPONENTINVOKE_CZID column data is prefabricated will meet predetermined specification.
The data that LSCOMPONENTINVOKE_CZFID column data is prefabricated, the module I D data consistent in will showing with SYMK, if current business component can call for multiple business module, available " ALL " keyword identification.
List structure is as follows:
Example is as follows: cash management Module registers component
Points for attention:
LSCOMPONENT_ID row will arrange consistent with the ID in GSPCOMPONENTFACTORY piece table.
LSCOMPONENT__YWLYID arranges prefabricated business source identification.
LSCOMPONENT_BB arranges the version of prefabricated front member, backward compatible.
Step 205: the service application of interface user finds the interface component that will call in described interface provider component registration table, and line interface of going forward side by side calls, by the service application of the information pushing of XML format to interface provider.
In this step, according to business operation ID and component version, the interface component that will call can be found in registration table.
Interface interchange in this step such as can comprise:
Step 206: find the interface component that will call in the registration table of interface user component described in the service application of described interface provider, line interface of going forward side by side calls, and the information processing result of XML format is pushed to the service application of described interface user.
In above-mentioned steps 205 and step 206, described information or information processing result can be XML format.
That is, in embodiments of the present invention, can using XML as data interchange format.Because the parsing standardization of XML format and the characteristic arbitrarily can adding node, thus avoid traditional intersystem interface and affect by the change of respective internal system service logic and the problem of provided interface parameters must be provided, improve stability and the extensibility of interface.
Step 207: the interface component of correspondence, for current untapped interface, is deleted by described business provider from interface provider component registration table.
Step 208: the interface component of correspondence, for current untapped interface, is deleted by described business user from interface user component registration table.
By step 203 and step 204, and the process of step 207 and step 208, achieve the hot plug of interface component.
See Fig. 4, for example, business provider such as business side A carries out business initiation, carries out corresponding component in a database search according to business source and component version, and carry out component and call, business user such as business side B carries out business reception and business processing performs write-back; Business side B carries out component in a database according to business source and component version and searches, and calls the component found, and then, business side A carries out follow-up business process.
See Fig. 5, one embodiment of the invention provides the coprocessing system between a kind of service application, comprising:
Database 501, for saving interface provider component registration table and interface user component registration table, wherein, preserving the interface component of the service application for providing interface in described interface provider component registration table, in described interface user component registration table, preserving the interface component of the service application for using interface;
Interface user traffic application device 502, in the described interface provider component registration table of described database 501, find the interface component that will call, line interface of going forward side by side calls, and pushes information to the traffic application device of interface provider;
The traffic application device 503 of interface provider, in the described interface user component registration table of described database 502, find the interface component that will call, line interface of going forward side by side calls, and information processing result is pushed to the service application of described interface user.
In an embodiment of the invention, in described database 501, the entering ginseng and go out ginseng for according to the parameter of the character string type of XML format tissue of each interface component described;
The described information of described interface provider traffic application device and the mutual XML format of described interface user traffic application device and information processing result.
In an embodiment of the invention, in described database 501, the information in component registration table comprises: component ID, component name, business operation ID, business operation title, the side of operation ID, component version and one or more in component date issued.
In an embodiment of the invention, described interface provider traffic application device 503 according to business operation ID and component version, finds the interface component that will call with described interface user traffic application device 502 in the registration table of described database.
In an embodiment of the invention, described interface provider traffic application device 503 is when needs provide service application, in the interface provider component registration table providing the interface component of interface to be stored in pre-set being used for described in execution, and further for current untapped interface, the component of correspondence is deleted from interface provider component registration table;
Described interface user traffic application device 502 is when needs use service application, in the interface user component registration table using the interface component of interface to be stored in pre-set being used for described in execution, and further for current untapped interface, the component of correspondence is deleted from interface user component registration table.
In embodiments of the present invention, the message informing between cooperative system also can be realized by calling interface component.
In embodiments of the present invention, the interface that interface user calling interface provider provides, generate the data of interface provider internal system, when these will be circulated message notice to interface user when interface provider internal system circulates by the data generated, interface user makes corresponding feedback after receiving the message.A series of feedback action extracts as message sink interface component by interface user, interface provider system, by searching prefabricated component in interface user message sink interface component registration table and carrying out calling the transmission of message between the system of reaching, realizes object collaborative between system.
It should be noted that, in this article, the relational terms of such as first and second and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element " being comprised " limited by statement, and be not precluded within process, method, article or the equipment comprising described key element and also there is other same factor.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.