Background technology
Oracle enterprise's service bus (OracleServiceBus, OSB) is the product that traditional middleware technology is combined with the technology such as XML, Web service.OSB provides connection maincenter most basic in network, is the essential elements constructing nervous system of enterprise.The appearance of OSB changes traditional software architecture, the solution more more cheap than traditional middleware product can be provided, simultaneously it can also eliminate the technological disparity between different application, allows different application server coordinate operation, it is achieved that communication between different services and integration.Functionally seeing, OSB provides event-driven and the tupe of document guiding and distributed running fluidization air flow, and it supports content-based route and filtration, has possessed the transmittability of complex data, it is possible to provide a series of standard interface.
BAM (BusinessActivityMonitoring, BAM) provides the real time access to Professional performance index, to improve speed and the efficiency of business running.
Current OSB and BAM is integrated, and what generally take is all use JCA binding technology scheme, OracleJDeveloper was utilized to create JCAAdpter as requested before this, after having created JCAAdpter, three files can be generated, then again these three file is imported in OSB, a WSDL can be generated after having imported, corresponding business service, agency service is created then according to this WSDL, also need to hand-coding one XLST, this XLST simultaneously and be used in agency service message stream the information shown will be needed to distribute to BAM.
Existing OSB and BAM integrated technical solution has following defects that establishment imports JCAAdpter to OSB and there is troublesome operation, writes XLST every time and there is difficulty and reusability is not high.Create JCAAdpter to be required for carrying out sequence of operations every time, and also need on three files passe of generation to the server at OSB place after having created, such operation all too is loaded down with trivial details, there is also sizable difficulty according to XSD hand-coding XLST simultaneously every time, and reusability is too low.
Thus, it is necessary to provide a kind of new method, to realize removing troublesome operation in OSB and BAM Integrated Solution, improve interface message stream configuration step reusability.
Summary of the invention
It is an object of the invention to provide a kind of OSB and BAM integrated approach and device, it is possible in OSB and BAM integrated technology, remove the troublesome operation importing JCAAdpter to OSB, reduce the difficulty writing XLST, improve its reusability;And client utilizes infrastructure service to return the information required for the critical field inquiry of recalls information, facilitate client misarrangement.
For solving above technical problem, the present invention provides a kind of oracle enterprise service bus OSB and BAM BAM integrated approach, including:
Step 1, OSB receive the request of client simple object access protocol, use Xquery and Xpath language to obtain the service invocation information of SOAP request by pipeline;
Step 2, OSB call infrastructure service and the described service invocation information got are saved in database table;
Step 3, BAM create data object according to described database table, utilize described data object create represent demand represent report.
Preferably, in described step 1, specifically include:
1.1, the agency service of OSB receives client SOAP request, by asking pipeline that SOAP request is routed to business service;
1.2, SOAP request is sent to service end by service end URL by business service;
1.3, service end receives SOAP request, uses Xquery and Xpath Language Processing SOAP request, obtains the service invocation information result in SOAP request, and through business service, agency service, result is returned to client by responding pipeline.
Preferably, in the route of request pipeline, use Xquery and Xpath language to obtain the service invocation information in SOAP request by various functions, be assigned to variable after getting these information and by them simultaneously, carry out information data preservation.
Preferably, in described step 2, may further comprise: that infrastructure service also returns the critical field of recalls information.
Preferably, described step 3 specifically includes:
3.1, BAM creates data object according to described database table;
3.2, according to representing demand, BAM utilize described data object create represent demand represent report.
For solving above technical problem, the present invention also provides for a kind of oracle enterprise service bus OSB and BAM BAM device, including: receiver module, acquisition module, calling module, creation module,
Described receiver module, receives client SOAP request for OSB;
Described acquisition module, uses Xquery and Xpath language to obtain the service invocation information of SOAP request for OSB by pipeline;
Described calling module, calls infrastructure service for OSB and the described service invocation information got is saved in database table;
Described creation module, creates data object for BAM according to described database table, utilize described data object create represent demand represent report.
Compared with prior art, a kind of OSB and BAM integrated approach provided by the invention and device, by in the route of request pipeline, Xquery and Xpath language is used to obtain the service invocation information in SOAP request by various functions and be assigned to variable carry out information data preservation to getting these information, it is possible to use these information datas in responding pipeline;Infrastructure service simultaneously returns the critical field of recalls information, and client goes to inquire about in bam required information by critical field afterwards, facilitates client misarrangement;At BAM end, data object set up by those tables inserting data with infrastructure service, then according to the demand represented, creates the figure that represents miscellaneous, and creates various querying condition, reduce query context.Import JCAAdpter to OSB troublesome operation by means of the invention it is also possible to remove in OSB and BAM integrated technology, reduce hand-coding XLST difficulty, improve its reusability.
Detailed description of the invention
In order to make the technical problem to be solved, technical scheme and beneficial effect clearly, understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein is only in order to explain the present invention, is not intended to limit the present invention.
Agency service is a key concept of OSB framework.Service user is connected with the back-end services of trustship via this interface.Agency service is the definition of intermediary's Web service that " service bus " realizes in this locality.Use OSB control station, can according to the transport-type defining interface of WSDL and use, Configuration Agent service;And specify message processing logic in the definition of message stream and collocation strategy.
Owing to message can be routed to multiple business service by agency service, therefore can independent of the business service with agent communication, the interface of Configuration Agent service.In this case, agency will be configured to the definition of message stream, and it is according to logical routing, and message is routed to corresponding business service, and then message data be mapped as the form that business service interface needs.
The core of agency service is " context ", and context is one group of XML variable, request stream and response flow share.New variables can be dynamically added to context, it is possible to delete variable from context.Predefined context variable comprises the information of relevant information, transmission head, safety philosophy, the metadata of current agent service, and the metadata of the primary circuit routing service called of agency service and issuing service.Context can be read by Xquery expression formula and change, and is updated by changing and suitably updating operation.
The present invention is in the message stream routed encapsulation of agency service, route use Xquery and Xpath language to Simple Object Access Protocol (SimpleObjectAccessProtocol, SOAP) message carry out various function process collect, finally these information are inserted in database table.This process is divided into the next stage:
The stage_ValidateMsgHeader stage
This stage is that at system entry end, client SOAP request is carried out preliminary authentication, to avoid invalid request, alleviates the pressure of server end, Appropriate application server end resource.Several parameter such as SOURCE_SYSTEM_ID, SOURCE_SYSTEM_NAME, USER_ID, USER_NAME of Msgheader is obtained during checking, and judge whether above parameter value exists or be whether empty, if there is no or be empty, receiving to add causes faulty operation interrupt requests to be directly returned to client, can return miscue to client simultaneously.
The stage_InputForReport stage
This stage is to collect the BAM solicited message needing to show.By Xquery and Xpath language, various function is used to obtain service invocation information and be saved in variable, otherwise these information will be lost in response pipeline, and the service invocation information of acquisition includes the address etc. of service call time, service call IP, service call.
The stage_OutputForReport stage
This stage is to be saved in variable by the service invocation information that service side returns, for instance service call success flag symbol, the service call successful information of return, call the information such as example ID, and these information is stored in database table by infrastructure service.
The stage_baminfo stage
This stage stores information in data base except to call infrastructure service after exhibition information being collected, and also receives the information that infrastructure service returns simultaneously.
The stage_ReplaceOutput stage
This stage is by the crucial ID of the information on services in record storage to data base, alternatively key ID is returned to client by making, so that client is when service call is made mistakes, details when using these crucial ID to go query calls in BAM, convenient service misarrangement.
As shown in Figure 1.The present invention provides a kind of OSB and BAM integrated approach, comprises the following steps:
Step 1, OSB receive client SOAP request, use Xquery and Xpath language to obtain the service invocation information of SOAP request by pipeline.Specifically include:
1.1, the agency service of OSB receives client SOAP request, by asking pipeline that SOAP request is routed to business service;
1.2, SOAP request is sent to service end by service end URL by business service;
1.3, service end receives SOAP request, uses Xquery and Xpath Language Processing SOAP request, obtains the service invocation information result in SOAP request, and through business service, agency service, result is returned to client by responding pipeline.
Wherein, in the route of request pipeline, Xquery and Xpath language is used to obtain the service invocation information in SOAP request by various functions, for instance to call end IP, call the information such as end time, invocation target address;Being assigned to variable after getting these information and by them simultaneously, carry out information data preservation, in order to use these information datas in response pipeline, otherwise these information datas are lost in response pipeline.
Step 2, OSB call infrastructure service and the described service invocation information got are saved in database table.Specifically include:
2.1, OSB calls infrastructure service and the described service invocation information got is stored in default database table in response pipeline.
2.2, infrastructure service returns the critical field of recalls information, facilitates client to pass through critical field and goes to inquire about in bam required information afterwards, and facilitates client misarrangement.
Step 3, BAM create data object according to described database table, utilize described data object create represent demand represent report.Specifically include:
3.1, BAM creates data object according to described database table;
3.2, according to representing demand, BAM utilize described data object create represent demand represent report, for instance create that 3D bar diagram, broken line graph, constitutional diagram, gauge table, Excel etc. are miscellaneous represents figure.Create various querying condition, for instance call end IP, allocating time, Service name etc., reduce query context by these querying conditions simultaneously.
As shown in Figure 2.The present invention provides a kind of OSB and BAM integrating device, including: receiver module 10, acquisition module 20, calling module 30, creation module 40.Wherein,
Receiver module 10, receives client SOAP request for OSB.
Acquisition module 20, uses Xquery and Xpath language to obtain the service invocation information of SOAP request for OSB by pipeline.
Calling module 30, calls infrastructure service for OSB and the described service invocation information got is saved in database table.
Creation module 40, creates data object for BAM according to described database table, utilize described data object create represent demand represent report.
A kind of OSB and BAM integrated approach provided by the invention and device, OSB is after receiving client request, by in the routed encapsulation of request pipeline, use Xquery and Xpath language obtain the service invocation information in SOAP request by various functions and be assigned to variable carry out information data preservation to getting these information, again through calling infrastructure service, these information are write in database table;Then BAM creates data object based on this database table, then sets up and represents report by recalls information with various pattern exhibitions out.By means of the invention it is also possible to remove the troublesome operation importing JCAAdpter to OSB in OSB and BAM integrated technology, reduce the difficulty of hand-coding XLST, improve its reusability.
Described above illustrate and describes a preferred embodiment of the present invention, but as previously mentioned, it is to be understood that the present invention is not limited to form disclosed herein, it is not to be taken as the eliminating to other embodiments, and can be used for other combinations various, amendment and environment, and in invention contemplated scope described herein, can be modified by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change are without departing from the spirit and scope of the present invention, then all should in the protection domain of claims of the present invention.