CN105577783B - A kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically - Google Patents
A kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically Download PDFInfo
- Publication number
- CN105577783B CN105577783B CN201510968053.7A CN201510968053A CN105577783B CN 105577783 B CN105577783 B CN 105577783B CN 201510968053 A CN201510968053 A CN 201510968053A CN 105577783 B CN105577783 B CN 105577783B
- Authority
- CN
- China
- Prior art keywords
- service
- ejb
- module
- data
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The present invention relates to a kind of systems that the information service that enterprises are traditional is issued as lightweight web services automatically, and HTTP request, network, Rest including external perimysium reference service automatic conversion system and enterprise EJB service:The Rest services automatic conversion system:HTTP request parsing module, data resolution module, service addressing module and enterprises service registration module;The enterprise EJB service oneself will be registered on enterprises service registration module;Enterprise's EJB service is divided into the service of the EJB with remote object and simple EJB service;It is simple types that the simple EJB service, which is parameter value,;The data resolution module is used to parse the remote object in transmission.The client that the present invention calls then completes the access of the resource in a manner of rest, and the data conversion on backstage and practical calling process are fully transparent to the user, has achieved the purpose that issue resource in a manner of rest.
Description
Technical field
The present invention relates to the network service that the traditional information service of enterprise is automatically converted to rest style, more particularly to
A kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically.
Background technique
With popularizing for Intranet, traditional business model is turned to the mould of internet operation by more and more enterprises
Formula.And traditional data applied to enterprises, resource and traditional enterprises ERP are also faced with integration and publication.
For example, due to using different system platforms, mutual service can not reuse for the ERP of enterprises, if
It is integrated using point-to-point, this method is extremely complex, and bigger information island easy to form, at present in the industry for this
Integration, popular mode is to pass through Enterprise SOA(SOA, Service Oriented Architecture)Come
Corporate resources is integrated, this mode is all can to match inconsistent data using unified by making different enterprise's heterogeneous systems
The data exchange agreement of format retains unified accessible services externally to realize the integrated of various heterogeneous systems.And wherein, make
With mark character state transmitting(Representational State Transfer, abbreviation REST)The side of the network service of style
Formula is then a kind of more feasible mode come the ERP service for integrating enterprises.Equally, for the data of enterprises and money
Source, the network service that rest style similarly can be used externally provide various access mechanisms.
The web services of Restful style are a kind of web services of lightweight popular recently.For now in the industry
General service architecture, rest service is more succinct, and more and more enterprise's web services all start to provide restful style
It realizes.During web services popular at present are realized, rest is several relative to other(Such as soap style web services and
xml-RPC)For it is more succinct and intuitive, the complexity of system can be greatly reduced.Therefore more and more enterprises take now
Business is realized using this style, such as Amazon and Yahoo etc., all externally provides the network service of rest style.
But the enterprise for much having completed information reform, the transformation once again for having service and Internet resources are
It needs to pay very big cost, if a large amount of internal enterprise resources to be issued as to the network service of rest style, is necessarily required to
Expend bigger resource.How under the premise of mustn't pay any cost or few cost, quickly finish this
The conversion of service mode, a good problem to study.In order to solve this problem.
Summary of the invention
It is an object of the invention to:For the above-mentioned technical problems in the prior art, in order to allow user more
The web services publication for being convenient to use rest framework and the resource for coordinating enterprises, different Service Sources is shielded to user
Between difference, a kind of automatic traditional EJB service the present invention provides publication enterprises is that restful infrastructure services are
System.
The present invention is achieved by the following technical solutions:A kind of information service that enterprises are traditional is issued as automatically
The system of lightweight web services, HTTP request, network, Rest including external perimysium reference service automatic conversion system and enterprise EJB
Service:The Rest services automatic conversion system:HTTP request parsing module, data resolution module, service addressing mould
Block and enterprises service registration module;The enterprise EJB service oneself will be registered on enterprises service registration module;The enterprise
Industry EJB service is divided into the service of the EJB with remote object and simple EJB service;The simple EJB service is parameter value
Only simple types;The data resolution module is used to parse the remote object in transmission.
Further, the enterprise EJB service is realized based on java RMI architectural mechanisms.
Further, the data resolution module handles the java object in transmission using the json data format of standard
Information parses format using the data of user oneself registration.
Further, the method for accessing simple EJB service is to be realized by the GET mode in http protocol, step
For:The parameter of the simple types of needs is placed in request header or required parameter first, converting system is asked automatically according to HTTP
The address asked services to inquire the EJB;Secondly analytic parameter, and obtain recalls information identical with RMI mechanism;Finally call
EJB service.
Further, the method that EJB of the access with remote object is serviced is using POST mode come Transfer Parameters, step
For:All parameters are write in request body by the JSON format of standard first and are transferred to server end;Secondly server end
The java object of standard is obtained by parsing the request body of JSON format;Pass through parsing HTTP request finally for EJB service
Address obtain.
Further, the Rest service automatic conversion system workflow step it is as follows:
(1)Request is parsed, the data in the various access informations request body in request header are obtained;
(2)Using service addressing module request data is handled, if service registration access address, directly
Fuzzy matching, otherwise then using the rule of default;The Service name and call method of the service can be got automatically from address,
If got, according to EJB registration information, the then complete description of the available service;
(3)After obtaining the service describing, according to the data in the data type and request body, then start to call data solution
Module is analysed, to parse to the request entity;
(4)In conjunction with step(2)Acquired information on services and step(3)The parameter information of acquisition then obtains calling
The complete information of the remote method, then the service calling module of the system accesses long-range EJB clothes in a manner of the RMI of standard
Business;If there is returning an object value, then can try again conversion according to resource of the data converter in data conversion module to return,
It obtains the initiation identifiable data format of user and returns to user
In conclusion by adopting the above-described technical solution, the beneficial effects of the invention are as follows:The client that the present invention calls is then
The access of the resource is completed in a manner of rest, the data conversion on backstage and practical calling process are fully transparent to the user,
Achieve the purpose that issue resource in a manner of rest.And traditional RMI of enterprise is serviced, as can be seen that the clothes from this example
Business does not need to do any change and adaptation, this greatly reduces enterprise to internet issuing service in addition to simply registering etc
Cost:The invention proposes a kind of automated system, EJB of the system mainly for the RMI mechanism of traditional basic java
It is issued as the rest service of standard automatically, made in this way by service under the premise of not needing to do any transformation to these services
The service mode for obtaining restful is more easily expanded in enterprises.
Detailed description of the invention
Examples of the present invention will be described by way of reference to the accompanying drawings, wherein:
Fig. 1 is the schematic diagram of present system;
Fig. 2 is the workflow schematic diagram of present system.
Specific embodiment
All features disclosed in this specification or disclosed all methods or in the process the step of, in addition to mutually exclusive
Feature and/or step other than, can combine in any way.
This specification(Including any accessory claim, abstract and attached drawing)Disclosed in any feature, except non-specifically chatting
It states, can be replaced by other alternative features that are equivalent or have similar purpose.That is, unless specifically stated, each feature is only
It is an example in a series of equivalent or similar characteristics.
Embodiment, as shown in Figure 1, a kind of information service that enterprises are traditional is issued as lightweight web clothes automatically
The system of business has largely through the internal services of traditional RPC form at present, is such as based on for the resource of enterprises
The EJB service that java RMI mode is realized, how to provide more succinct and general access mode for these services is a ratio
The problem of relatively meriting attention.Here a kind of automated system that these traditional services can be adapted for rest service is proposed.
All are all regarded as resource by rest service.The main purpose of rest service provided herein is also that will be visited by light-weighted resource
The mode asked issues these enterprises services, externally provides more convenient and fast access mode.
Traditional EJB is serviced, is realized based on java RMI mechanism.Service is realized by transmission remote object
The transmitting of request and response message.And rest service is then to make all passing through for user in our system based on HTTP request
POST mode and GTE mode in http protocol access resource.
Concrete implementation is, firstly, our system provides a registration module, enterprise EJB service is only needed oneself
It is registered in this module, then the module then can go to inquire this according to the address URL of request by a kind of rule appointed
EJB service.Although, for more convenient and fast issuing service, we provide default this system provides the extension of rule
Matching way, the RMI framework of Java are all to obtain information according to service and remote method call, therefore, for determining address
Server-side, in most cases, the service interface name or JNDI of the EJB externally provided can be with method names together only
One determines a far call.It certainly, can also be by the registration mould if there is the situation for determining service by different parameters
Different access address is registered on block to solve.In this way, basic EJB service is not needed itself to make any modification and can be realized
It is called by the access mechanism of rest style outside.
For the data in transmission, we provide data resolution module, module default uses the json data of standard
Format come handle transmission in java object information, here user can also oneself log-on data parsing module, so as to cleverer
Do-it-yourself data parsing living.Data parsing is mainly used to the remote object in parsing transmission, for the object of java standard
Conversion between JSON data is that have the standard of specification, therefore, can satisfy the needs of Data Format Transform substantially.
There is above-mentioned functional module, we then have convenient and fast access mechanism, we mainly pass through GET and POST here
Method accesses these services, and specific access mechanism is as follows:
Firstly, for simple EJB method, that is, parameter value is simple types, then can be assisted completely by HTTP
GET mode in view is realized, the parameter of the simple types of needs is placed in request header or required parameter, converting system from
It is dynamic that EJB service is inquired according to the address of HTTP request, then analytic parameter, and acquisition calling identical with RMI mechanism
Information.Then the EJB is called to service.
And the EJB with remote object is serviced, since object may be more complicated, obtained by simple Get method
It takes service then to seem awkward, in many scenes, can not effectively and completely transmit all information of our needs.Cause
This, herein, all parameters, come Transfer Parameters, are write on request body by the JSON format of standard using POST mode by us
In be transferred to server end.Server end obtains the java object of standard by parsing the request body of JSON format.For EJB
Service, and obtained by the address of parsing HTTP request.
Flow chart as shown in Figure 2, the EJB for saving order data with one service citing, it is necessary first to infuse the service
Volume is forwarded the service in this way, the system can then be defaulted in the service register module of the converting system.If do not done
Any other registration(For example data conversion module and address of service are registered), then the system can be used the service describing and be produced
Raw default setting accesses the service.
For a specific request, the address url that default generates before first accesses the service, because order is
More complicated business object, therefore be to request to send remote object data by post to the processing of this remote object.This
In send http request to service converting system after, in conjunction with the flow chart drawn by above, the step of workflow, is as follows:
(1)The request is parsed, the various access informations in request header and the data in request body are obtained.
(2)Request data is handled using service addressing module, mainly obtains clothes according to request address here
Business.If service registration access address, direct fuzzy matching, otherwise then using the rule of default.The address is carried out
It decomposes, because the address is then to can oneself from address according to the generation of the recalls information of service, mainly interface and method information
The dynamic Service name and call method for getting the service.It is according to EJB registration information, then available to be somebody's turn to do if got
The complete description of service.
(3)It then can be the entity object of order herein according to the parameter in service describing after obtaining the service describing
Type.According to the data type and request body in data, then start call data resolution module, to the request entity into
Row parsing.Here it is to allow the customized resolver of user's registration, it is some special using oneself can be convenient user in this way
Rule and processing logic data are carried out with personalized working process.In this example, the resolver is not registered, therefore is used
The json data format of default carries out from json data to the standard conversion of java object request data.Here conversion is completed,
Then obtain the parameter information of the service.
(4)In conjunction with step(2)Acquired information on services and step(3)The parameter information of acquisition then obtains calling
The complete information of the remote method, then the service calling module of the system accesses long-range EJB in a manner of the RMI of standard.
If there is returning an object value, then can try again conversion according to resource of the data converter in data conversion module to return, obtain
User is returned to the identifiable data format of user is initiated.
Finally, we complete the remote service disposed in a manner of EJB.And the client called is then complete in a manner of rest
At the access of the resource, the data conversion on backstage and practical calling process are fully transparent to the user, have reached with rest
Mode issues the purpose of resource.And traditional RMI of enterprise is serviced, as can be seen that the service is in addition to simple from this example
Registration etc, does not need to do any change and adaptation, this greatly reduces enterprise to the cost of internet issuing service.
Particular embodiments described above has carried out further in detail the purpose of the present invention, technical scheme and beneficial effects
It describes in detail bright, it should be understood that the above is only a specific embodiment of the present invention, is not intended to restrict the invention.This
Invention expands to any new feature disclosed in the present specification or any new combination, and any new method for disclosing or
The step of process or any new combination.
Claims (4)
1. a kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically, it is characterised in that:Packet
Include HTTP request module, network module, the automatic conversion system of Rest service and the enterprise's EJB service module of external perimysium reference:It is described
Rest service automatic conversion system and include:HTTP request parsing module, data resolution module, service addressing module and enterprise's clothes
Business registration module;Enterprise's EJB service module oneself will be registered on enterprises service registration module;The enterprise EJB
Service module is divided into the service of the EJB with remote object and simple EJB service;The simple EJB service is parameter value
Only simple types;
The data resolution module is used to parse the remote object in transmission, and the data resolution module is using standard
Json data format parses format come the data for handling the java object information in transmission or user oneself being used to register;
The workflow step that the Rest services automatic conversion system is as follows:
(1) request is parsed, obtains the data in various access information request bodies;
(2) request data is handled using service addressing module, it is directly fuzzy if service registration access address
Matching, otherwise then using the rule of default;The Service name and call method of the service can be got automatically from address, if
It gets, then according to EJB registration information, the then complete description of the available service;
(3) after obtaining the service describing, according to the data in data type and request body, then start to call data parsing mould
Block, to be parsed to the request entity;
(4) parameter information for combining information on services acquired in step (2) and step (3) to obtain, then obtaining calling, this is remote
The complete information of Cheng Fangfa, then the service calling module of the system accesses long-range EJB service in a manner of the RMI of standard;
If there is returning an object value, then can try again conversion according to resource of the data converter in data conversion module to return, obtain
User is returned to the identifiable data format of user is initiated.
2. what the information service according to claim 1 that enterprises are traditional was issued as lightweight web services automatically is
System, which is characterized in that the enterprise EJB service module is realized based on java RMI architectural mechanisms.
3. what the information service according to claim 1 that enterprises are traditional was issued as lightweight web services automatically is
System, which is characterized in that the method for accessing simple EJB service is to be realized by the GET mode in http protocol, step
For:The parameter of the simple types of needs is placed in request header or required parameter first, converting system is asked automatically according to HTTP
The address asked services to inquire the EJB;Secondly analytic parameter, and obtain recalls information identical with RMI mechanism;Finally call
EJB service.
4. what the information service according to claim 1 that enterprises are traditional was issued as lightweight web services automatically is
System, which is characterized in that the method that EJB of the access with remote object is serviced is using POST mode come Transfer Parameters, step
For:All parameters are write in request body by the JSON format of standard first and are transferred to server end;Secondly server end
The java object of standard is obtained by parsing the request body of JSON format;Pass through parsing HTTP request finally for EJB service
Address obtain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510968053.7A CN105577783B (en) | 2015-12-22 | 2015-12-22 | A kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510968053.7A CN105577783B (en) | 2015-12-22 | 2015-12-22 | A kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105577783A CN105577783A (en) | 2016-05-11 |
CN105577783B true CN105577783B (en) | 2018-11-16 |
Family
ID=55887427
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510968053.7A Active CN105577783B (en) | 2015-12-22 | 2015-12-22 | A kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105577783B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106127573B (en) * | 2016-06-17 | 2019-07-16 | 深圳市雁联计算系统有限公司 | A kind of lightness operation system and method |
CN112612461B (en) * | 2020-12-28 | 2023-07-25 | 浪潮通用软件有限公司 | Method for unified management and release of secure API interface in ERP system |
CN113242241A (en) * | 2021-05-11 | 2021-08-10 | 浙江鸿程计算机系统有限公司 | Method for converting SAP RFC protocol into HTTP protocol |
CN115001760B (en) * | 2022-05-20 | 2024-05-28 | 中国船级社 | Industrial Internet converged code sending service system and method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102546798A (en) * | 2011-12-31 | 2012-07-04 | 易程科技股份有限公司 | Data transmission method and system of train-mounted terminal, server and train-mounted terminal |
CN103559234A (en) * | 2013-10-24 | 2014-02-05 | 北京邮电大学 | System and method for automated semantic annotation of RESTful Web services |
CN104462460A (en) * | 2014-12-16 | 2015-03-25 | 武汉理工大学 | Method of constructing REST (representational state transfer) styled ontology annotation visualization system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9003361B2 (en) * | 2012-11-30 | 2015-04-07 | Red Hat Israel, Ltd. | Generating a restful web service software development kit client |
-
2015
- 2015-12-22 CN CN201510968053.7A patent/CN105577783B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102546798A (en) * | 2011-12-31 | 2012-07-04 | 易程科技股份有限公司 | Data transmission method and system of train-mounted terminal, server and train-mounted terminal |
CN103559234A (en) * | 2013-10-24 | 2014-02-05 | 北京邮电大学 | System and method for automated semantic annotation of RESTful Web services |
CN104462460A (en) * | 2014-12-16 | 2015-03-25 | 武汉理工大学 | Method of constructing REST (representational state transfer) styled ontology annotation visualization system |
Non-Patent Citations (1)
Title |
---|
"基于REST和SOAP的Mashup平台Web服务研究与实现";苏会杰;《中国硕士学位论文全文库》;20120815;正文第3-5章节 * |
Also Published As
Publication number | Publication date |
---|---|
CN105577783A (en) | 2016-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105577783B (en) | A kind of system that the information service that enterprises are traditional is issued as lightweight web services automatically | |
US7529833B2 (en) | Method, system, and web service broker for dynamic web service invocation | |
CN105763619B (en) | The method and device that client and server-side are communicated | |
CN101667125B (en) | Method and system for matching operation examples in model execution of BPMN (Business Process Modeling Notation) | |
CN103491135B (en) | Device and method for conducting self-matching on data formats | |
CN103139234B (en) | A kind of device and method of data, services encapsulation | |
US7904111B2 (en) | Mobile exchange infrastructure | |
CN101981897A (en) | Method and device for communicating according to the standard protocol OPC UA in a client/server system | |
EP2107712A1 (en) | Method, apparatus and system for composite service process, replacement and concrete service invocation | |
CN1527556A (en) | Method and equipment for event service declaration, registration and notice | |
Azzara et al. | Middleware solutions in WSN: The IoT oriented approach in the ICSI project | |
EP2262166B1 (en) | Method, system and apparatus for realizing combined charging service | |
KR20080064587A (en) | Open framework system for heterogeneous computing and service integration | |
Zhang et al. | Research on IOT RESTful web service asynchronous composition based on BPEL | |
CN103002047B (en) | A kind of RPC formulas web server architecture method | |
Granell et al. | Assessment of OGC web processing services for REST principles | |
CN101916283A (en) | Method for acquiring link information from dynamic webpage and server thereof | |
CN105516269A (en) | Application configuration method and application configuration device | |
US20080141263A1 (en) | Embedded agent framework and method of providing ubiquitous services using the same | |
CN101447951A (en) | System and method for service oriented email client application | |
EP3200427A1 (en) | Object information processing method, device and ors application gateway | |
CN1168032C (en) | Multijob data exchange method and device | |
CN101257495A (en) | Semantic message transmission method and communication system as well as message processing device | |
CN103885780A (en) | Website development method and server | |
CN102404391A (en) | WEB service invoking method oriented to interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |