CN106686021A - Service invoking method and gateway - Google Patents

Service invoking method and gateway Download PDF

Info

Publication number
CN106686021A
CN106686021A CN201510744686.XA CN201510744686A CN106686021A CN 106686021 A CN106686021 A CN 106686021A CN 201510744686 A CN201510744686 A CN 201510744686A CN 106686021 A CN106686021 A CN 106686021A
Authority
CN
China
Prior art keywords
service
http
called
call
services
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.)
Granted
Application number
CN201510744686.XA
Other languages
Chinese (zh)
Other versions
CN106686021B (en
Inventor
江龙飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201510744686.XA priority Critical patent/CN106686021B/en
Publication of CN106686021A publication Critical patent/CN106686021A/en
Application granted granted Critical
Publication of CN106686021B publication Critical patent/CN106686021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The application discloses a service invoking method and gateway. The method includes the following steps: an invoking service request party transmitting Http parameters to a system which provides services, the Http parameters carrying invoking service information; a gateway of the system which provides services analyzing the received Http parameters by using a Http protocol to obtain the invoking service information, based on the invoking service information, through an application programming interface (API) of an invoking service frame of the system, invoking corresponding services, and returning the result of the invoking to the invoking service request party. According to the invention, the method can achieve service invoking among different language systems and is easy to develop and use.

Description

A kind of service calling method and gateway
Technical field
The present invention relates to computer networking technology, more particularly to a kind of service calling method and gateway.
Background technology
Services Oriented Achitecture component model (SOA) can be all adopted currently for large-scale website or large scale system To realize, whole system is finely divided as several subsystems with the project of language, service call is passed through between subsystem Framework improves the efficiency of system with this interacting.But, when external system is and the system is across language When, only cannot be solved the problems, such as by way of service call it is current, now, it is necessary to by each business subsystem System issues into WebServive or other similar services, so that external system is called.So, it is necessary to outer to provide The web Service interface service called individually is write in calling for system.
Because external system calls the interface quantity of current system relatively more in prior art, it is adopted as each interface and issues Into the method that web Service interface service is called for external system, will inevitably increase system development and use Complexity.Not yet propose at present it is a kind of can be with the scheme of effectively solving the problems referred to above.
The content of the invention
In view of this, present invention is primarily targeted at providing a kind of service calling method and gateway, it is possible to achieve across language Service call between speech system and it is easy to develop and uses.
In order to achieve the above object, technical scheme proposed by the present invention is:
A kind of service calling method, including:
The system that service request direction provides service is called to send HTTP Http parameters, the Http parameters Information on services is called in carrying;
The gateway of the system for providing service, is parsed using Http agreements to the Http parameters for receiving, Information on services is called described in obtaining, according to described information on services is called, service framework application program is called by the system DLL API, calls corresponding service, and returns call result and call service requester to described.
A kind of service call gateway, including:
Parsing module, adjusts for after the Http parameters for calling service requester to send are received, the Http parameters to be carried With information on services, the Http parameters for receiving are parsed using Http agreements, service letter is called described in acquisition Breath;
Calling module, for calling information on services according to described, by the system service framework application programming is called Interface API, calls corresponding service, and returns call result and call service requester to described.
In sum, service calling method proposed by the present invention and gateway, based on Http agreements, using a gateway, bear The Http parameters of the service call of each external system are converted into corresponding service call by duty, such that it is able to reach across language The result that can be seamlessly connected is called between system.Therefore, there is no need to provide calling individually to write and calling for external system Web Service interface service, such that it is able to the complexity for system development being greatly lowered and use.
Description of the drawings
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention;
Fig. 2 is the gateway architecture schematic diagram of the embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing and it is embodied as The present invention is described in further detail for example.
The present invention core concept be:It is right based on Http agreements using a gateway for each application system External system is processed for the Http requests of the service call of each subsystem in the system, specifically by this Gateway, the information on services that calls in Http requests calls the corresponding interface service of the system, and returning result To external system.Call to external system thus, each interface need not be issued into web Service interface and be serviced, Enter without individually writing the web Service interface service called to provide calling for external system, such that it is able to System development and the complexity for using is greatly lowered.
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention, as shown in figure 1, the embodiment mainly includes:
Step 101, the system transmission Http parameters that the offer service of service request direction is provided, the Http parameters Information on services is called in carrying.
In this step, service requester is called to be taken in the form of web Service interface is called again Business is called, and only needs in the form of Http parameters, information on services will be called to notify to the system for providing service i.e. Can.So, on the one hand in system development, developer need not individually write to provide calling for external system The web Service interface service called, on the other hand when in use, calls service requester to be not required to GPRS big The web Service interface information of amount, such that it is able to the complexity for service call exploitation being greatly lowered and use.
It is preferred that the call parameters information will include:Service name, method name, parameter and the group name for calling.
The gateway of step 102, the system that service is provided, using Http agreements to the Http that receives Parameter is parsed, and described in acquisition information on services is called, and according to described information on services is called, and is adjusted by the system Service framework API is used, corresponding service is called, and is returned call result and call service requester to described.
In this step, there is provided the system of service, will be responsible for uniting the call request of external system using a gateway One is processed, and is based on Http agreements by it and corresponding tune is parsed from the Http parameters for calling service requester to send With information on services, then information on services is called further according to this, using system service framework API is called, directly invoked Corresponding service, and return result to called side.Thus, when system interface exploitation is carried out, it is not necessary to individually The interface that a set of external system of redeveloping is called, but be directly called by gateway conversion just can realize across The service call of language.
In this step, go out to call the concrete grammar of information on services based on Http protocol analysis, and adjusted using system The concrete grammar for directly invoking respective service with service framework API is grasped by those skilled in the art, and here is not Repeat again.
In actual applications, if the service that the system is provided is the service of clustered deploy(ment), gateway can be according to biography The supplemental characteristic for entering, is routed in the service of different clusters according to the routing iinformation configured in routing configuration table.
Fig. 2 is a kind of service call gateway architecture schematic diagram corresponding with said method, as shown in Figure 2 the net Pass includes:
Parsing module, adjusts for after the Http parameters for calling service requester to send are received, the Http parameters to be carried With information on services, the Http parameters for receiving are parsed using Http agreements, service letter is called described in acquisition Breath;
Calling module, for calling information on services according to described, by the system service framework application program is called DLL API, calls corresponding service, and returns call result and call service requester to described.
It is preferred that the call parameters information includes:Service name, method name, parameter and the group name for calling.
In sum, presently preferred embodiments of the present invention is these are only, is not intended to limit the protection of the present invention Scope.All any modification, equivalent substitution and improvements within the spirit and principles in the present invention, made etc., Should be included within protection scope of the present invention.

Claims (4)

1. a kind of service calling method, it is characterised in that include:
The system that service request direction provides service is called to send HTTP Http parameters, the Http parameters Information on services is called in carrying;
The gateway of the system for providing service, is parsed using Http agreements to the Http parameters for receiving, Information on services is called described in obtaining, according to described information on services is called, service framework application program is called by the system DLL API, calls corresponding service, and returns call result and call service requester to described.
2. method according to claim 1, it is characterised in that the call parameters information includes:The clothes for calling Business name, method name, parameter and group name.
3. a kind of service call gateway, it is characterised in that include:
Parsing module, adjusts for after the Http parameters for calling service requester to send are received, the Http parameters to be carried With information on services, the Http parameters for receiving are parsed using Http agreements, service letter is called described in acquisition Breath;
Calling module, for calling information on services according to described, by the system service framework application programming is called Interface API, calls corresponding service, and returns call result and call service requester to described.
4. gateway according to claim 3, it is characterised in that the call parameters information includes:The clothes for calling Business name, method name, parameter and group name.
CN201510744686.XA 2015-11-05 2015-11-05 Service calling method and gateway Active CN106686021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510744686.XA CN106686021B (en) 2015-11-05 2015-11-05 Service calling method and gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510744686.XA CN106686021B (en) 2015-11-05 2015-11-05 Service calling method and gateway

Publications (2)

Publication Number Publication Date
CN106686021A true CN106686021A (en) 2017-05-17
CN106686021B CN106686021B (en) 2021-06-29

Family

ID=58857597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510744686.XA Active CN106686021B (en) 2015-11-05 2015-11-05 Service calling method and gateway

Country Status (1)

Country Link
CN (1) CN106686021B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107592358A (en) * 2017-09-19 2018-01-16 广州视源电子科技股份有限公司 Application programming interfaces call method and device based on HTTP service
CN109510846A (en) * 2017-09-14 2019-03-22 北京金山云网络技术有限公司 API Calls system, method, apparatus, electronic equipment and storage medium
CN109660573A (en) * 2017-10-10 2019-04-19 北京京东尚科信息技术有限公司 Data transmission method and device
CN110113394A (en) * 2019-04-19 2019-08-09 浙江数链科技有限公司 API Calls method and apparatus
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN110365751A (en) * 2019-06-26 2019-10-22 口碑(上海)信息技术有限公司 Method for processing business, device and the equipment of gateway system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909551A (en) * 2005-08-03 2007-02-07 北京航空航天大学 Data exchanging method based on Web service
CN101022431A (en) * 2007-03-09 2007-08-22 中国移动通信集团福建有限公司 Interface gateway and interface gateway data processing method
CN101686253A (en) * 2008-09-23 2010-03-31 华为技术有限公司 Service selecting method, device and system thereof
CN102279773A (en) * 2011-07-28 2011-12-14 迈普通信技术股份有限公司 Bidirectional remote calling method and system
CN103139234A (en) * 2011-11-23 2013-06-05 中国移动通信集团公司 Device and method for encapsulating data service
CN104270470A (en) * 2014-10-24 2015-01-07 杭州高达软件系统股份有限公司 Remote service invocation method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909551A (en) * 2005-08-03 2007-02-07 北京航空航天大学 Data exchanging method based on Web service
CN101022431A (en) * 2007-03-09 2007-08-22 中国移动通信集团福建有限公司 Interface gateway and interface gateway data processing method
CN101686253A (en) * 2008-09-23 2010-03-31 华为技术有限公司 Service selecting method, device and system thereof
CN102279773A (en) * 2011-07-28 2011-12-14 迈普通信技术股份有限公司 Bidirectional remote calling method and system
CN103139234A (en) * 2011-11-23 2013-06-05 中国移动通信集团公司 Device and method for encapsulating data service
CN104270470A (en) * 2014-10-24 2015-01-07 杭州高达软件系统股份有限公司 Remote service invocation method, device and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109510846A (en) * 2017-09-14 2019-03-22 北京金山云网络技术有限公司 API Calls system, method, apparatus, electronic equipment and storage medium
CN109510846B (en) * 2017-09-14 2020-11-03 北京金山云网络技术有限公司 API calling system, method and device, electronic equipment and storage medium
CN107592358A (en) * 2017-09-19 2018-01-16 广州视源电子科技股份有限公司 Application programming interfaces call method and device based on HTTP service
CN109660573A (en) * 2017-10-10 2019-04-19 北京京东尚科信息技术有限公司 Data transmission method and device
CN109660573B (en) * 2017-10-10 2021-10-15 北京京东尚科信息技术有限公司 Data transmission method and device
CN110113394A (en) * 2019-04-19 2019-08-09 浙江数链科技有限公司 API Calls method and apparatus
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN110365751A (en) * 2019-06-26 2019-10-22 口碑(上海)信息技术有限公司 Method for processing business, device and the equipment of gateway system
CN110365751B (en) * 2019-06-26 2020-10-27 口碑(上海)信息技术有限公司 Service processing method, device and equipment of gateway system

Also Published As

Publication number Publication date
CN106686021B (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN106686021A (en) Service invoking method and gateway
CN109284197B (en) Distributed application platform based on intelligent contract and implementation method
CN102902537B (en) Based on the embedded type WEB MVC Development Framework of FastCGI and html template
US11146641B2 (en) Internet of things information system
EP2418825A1 (en) Method and system for generating open telecommunication service based on internet
CN101923485A (en) JACA remote invocation method in CORBA (Common Object Request Breaker Architecture) system
CN108845798A (en) A kind of visualization big data task cradle and processing method
Montesi Process-aware web programming with Jolie
US20150067013A1 (en) Methods for servicing web service requests using parallel agile web services and devices thereof
CN101964797A (en) Service interaction method and system
CN103268230A (en) Method used for constructing cloud computing information management platform capable of expanding service
CN102722377B (en) Network video application processing system based on adaptive communication environment (ACE) framework
CN103002047B (en) A kind of RPC formulas web server architecture method
CN104363212B (en) A kind of socket communication semantemes analytic method and application system based on Lua
CN103067511A (en) Control method of hyper text transport protocol (HTTP) demand processing
US11349729B2 (en) Network service requests
CN102654840A (en) Function callback method and system
CN105068820A (en) Method for integrating Axis development and issuing Web Services based on SSH framework
CN104063219A (en) Form development method and system for WEB system
CN110636073A (en) Distributed asynchronous remote service arranging and calling technology
Sefid‐Dashti et al. A reference architecture for mobile SOA
CN105260179A (en) Method for achieving flex and servlet interaction
CN109714397A (en) Internet proxy server management system
CN104253703B (en) A kind of method and apparatus of communication
CN106961687B (en) Information interaction method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant