CN109451014B - WebService agent system and transparent agent method thereof - Google Patents

WebService agent system and transparent agent method thereof Download PDF

Info

Publication number
CN109451014B
CN109451014B CN201811300136.9A CN201811300136A CN109451014B CN 109451014 B CN109451014 B CN 109451014B CN 201811300136 A CN201811300136 A CN 201811300136A CN 109451014 B CN109451014 B CN 109451014B
Authority
CN
China
Prior art keywords
service
webservice
address
module
client
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
Application number
CN201811300136.9A
Other languages
Chinese (zh)
Other versions
CN109451014A (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.)
Anhui Zhongke Guochuanggao Trusted Software Co ltd
Original Assignee
Ustc Sinovate Software 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 Ustc Sinovate Software Co ltd filed Critical Ustc Sinovate Software Co ltd
Priority to CN201811300136.9A priority Critical patent/CN109451014B/en
Publication of CN109451014A publication Critical patent/CN109451014A/en
Application granted granted Critical
Publication of CN109451014B publication Critical patent/CN109451014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/50Network services
    • H04L67/56Provisioning of proxy services
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a WebService agent system.A service registration module registers and registers the real address of a WebService service and the WSDL information address to generate a virtual service address and stores the information to a data server, a service monitoring module is responsible for opening an HTTP port and monitoring a service calling request and a WSDL file request sent by a WebService client, and a service agent module is responsible for forwarding the received client request to the real WebService server. The WebService agent system and the transparent agent method thereof enable client developers to directly generate the WebService client according to the WSDL content provided by the agent system without considering factors such as address conversion and the like, and directly call the WebService client without manually adjusting codes, thereby effectively improving the development efficiency and the implementation efficiency of the deployment access of the agent platform.

Description

WebService agent system and transparent agent method thereof
Technical Field
The invention relates to the technical field of computers and computer software, in particular to a WebService agent system and a transparent agent method thereof.
Background
The WebService service is a common information system data interface technology based on HTTP and XML technologies, and is widely used for meeting data interaction requirements and system cooperation requirements among various systems. Under the simplest network architecture, a service provider creates and provides WebService service, and a service consumer calls the service through a WebService client to acquire or push data, so that the aim of data transmission is fulfilled. In this scenario, the service consumer can connect to the network port of the service provider.
With the continuous development of technologies and requirements of an ESB bus, an API gateway, application service interface authority control and the like, service consumers cannot be directly connected with a service provider in more and more scenes and must transit through proxy services. The WebService protocol is an application layer protocol based on the HTTP protocol, so that proxy can be realized through the HTTP proxy technology. However, due to the complexity of the WebService protocol itself, in reality, wsdl (web Services Description language) is usually used to create a Description file for describing the number, type, interface method, and other calling details of the WebService service, and the Description file is published together with the service. The service consumer typically generates client code based on the description file, thereby simplifying the development process. Some webseries development kits also provide a way to perform WebService service invocation in real time based on WSDL files, and are widely used. However, the WSDL description file provided by the service provider contains the fixed domain name or IP address of the service provider, so the call code generated from this WSDL file can only call the original address of the service. When the WebService service needs to be accessed through the proxy server, the client may fail to call because the network is not reachable.
The current common solution is that a service consumer generates a client code based on a WSDL file in a development stage, and then manually modifies an original service address appearing in the code into a proxy server address and then executes the client code. If a developer adopts a technical mode of dynamically acquiring WSDL and calling the service when calling the service, the technical model selection needs to be modified and changed into other calling modes, or extra codes are added for dynamically replacing service addresses. The service provider can also provide a modified WSDL file, and the proxy address is directly written into the WSDL, but the WSDL file does not conform to the principle that the proxy is transparent to the service provider, and cannot flexibly meet the requirement scenes of proxy server address change, multiple proxies and the like in an enterprise environment. Either method brings great trouble to developers.
In addition, in the network environment of some large enterprises and public institutions, networks among organizations such as sub-companies and lower-level organizations cannot be directly intercommunicated, and each sub-network must be connected with the outside through a specific gateway. In this case, only one agent system is deployed, and thus, the agent requirement cannot be achieved because two sub-networks cannot be accessed simultaneously. The complexity and effort of the aforementioned problems will rise dramatically if interconnected by multiple agent systems.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides the WebService agent system and the transparent agent method thereof, which can automatically modify the service address in the WSDL description file, reduce the development difficulty of the WebService client and improve the production efficiency.
In order to achieve the above object, the present invention provides the following technical solutions: a WebService agent system comprises a WebService client, a service registration module, a service monitoring module, a service agent module, a WebService server and a data server.
As a further optimization of the above scheme, the WebService client is configured to send a service invocation request and a WSDL file request.
As a further optimization of the above scheme, the service registration module is configured to register an address of a real WebService service and an address of WSDL file information, generate a virtual service address, and store the information in the data server.
As a further optimization of the above scheme, the service monitoring module is responsible for opening the HTTP port and monitoring the service invocation request and the WSDL file request sent by the WebService client.
As a further optimization of the above scheme, the WebService server is configured to receive a WebService client request forwarded by the service agent module.
As a further optimization of the above scheme, the data server is configured to store an address of the WebService service, a WSDL information address, and a virtual service address.
As a further optimization of the above scheme, the service agent module is responsible for forwarding the received client request to the real WebService server, modifying data returned by the WebService server based on information in the data server, and forwarding the modified data to the WebService client via the service monitoring module.
The invention also provides a WebService transparent proxy method, which specifically comprises the following steps:
(21) the service registration module registers and registers the address of the WebService service needing to be proxied and the WSDL file acquisition address of the service;
(22) the service registration module generates a service address on the proxy system and a WSDL (wireless sensor link layer definition) file acquisition address of the service for the WebService service to be proxied;
(23) the service monitoring module monitors and receives a request sent by the WebService client;
(24) the service monitoring module judges whether the request address of the received WebService client is a service address or a WSDL file acquisition address, if the request address is the service address, the step (25) is skipped, otherwise, the step (27) is skipped;
(25) the service agent module sends the request data to the address of the WebService to be proxied according to the registration information to obtain response information of the WebService;
(26) returning response information of the WebService service to the WebService client through the service monitoring module, and ending the service agent process;
(27) the service agent module accesses the WSDL file of the proxied WebService service to acquire an address according to the registration information, and acquires the WSDL content of the proxied WebService service;
(28) the service proxy module replaces the service address of the WebService service appearing in the WSDL content acquired in the step (27) with the service address generated in the step (22) according to the information registered in the step (21) and the step (22) by the service registration module to generate modified WSDL content;
(29) the service agent module returns the modified WSDL content to the WebService client through the service monitoring module, and the service agent process is finished.
As a further optimization of the above scheme, since the WSDL information is not changed after the WebService service is released, the present invention preferably caches the modified WSDL content after the step (28) is finished, so that when the next step is reached to the step (27), the subsequent processing is skipped, and the cached modified WSDL content is directly returned, thereby effectively improving the system operation performance.
The invention also discloses a device, comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform a WebService proxy system and transparent proxy method thereof of any of claims 1-3.
The present invention also discloses a computer-readable storage medium storing a computer program which, when executed by a processor, implements a WebService proxy system and a transparent proxy method thereof according to any one of claims 1 to 3.
Compared with the prior art, the WebService agent system and the transparent agent method thereof have the following beneficial effects that:
1. the WebService agent system and the transparent agent method thereof provided by the invention can virtually generate a self-consistent WebService service on the agent platform, the WebService agent mode is transparent to both the client and the real server, the client does not need to know the real service information of the back end, and the server does not need to modify the WSDL information of the server because of being acted.
2. According to the WebService agent system and the transparent agent method thereof, provided by the invention, through virtual WebService service, client developers do not need to consider factors such as address conversion and the like, can directly generate the WebService client according to the WSDL content provided by the agent system and directly call the WebService client without manually adjusting codes, and the development efficiency and the implementation efficiency of the deployment access of the agent platform can be effectively improved.
3. The WebService agent system and the transparent agent method thereof provided by the invention can carry out multiple cascade agent on the WebService service, the virtual service generated by each level of agent is self consistent, and is transparent to the front and back level of agents, so that a cascade agent mode can be easily formed, and the cross-network service calling requirement is realized.
Drawings
Fig. 1 is a schematic structural diagram of a WebService proxy system of the present invention.
Fig. 2 is a flowchart of the WebService transparent proxy method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples. It should be understood, however, that the description herein of specific embodiments is only intended to illustrate the invention and not to limit the scope of the invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Example 1:
referring to fig. 1, the WebService proxy system of the present embodiment includes a service registration module 1, a WebService client 2, a service monitoring module 3, a service proxy module 4, a WebService server 5, and a data server 6.
The service registration module 1 registers and registers the address of the real WebService service 5 and the WSDL file information address, generates a virtual service address and stores the virtual service address to the data server 6, the service monitoring module 3 is responsible for opening an HTTP port and monitoring a service call request and a WSDL file request sent by the WebService client 2, and the service agent module 4 is responsible for forwarding the received client request to the real WebService server 5, modifying data returned by the WebService service 5 based on the information in the data server 6 and forwarding the modified data to the WebService client 2 through the service monitoring module 3.
Example 2:
corresponding to the WebService proxy system in the first embodiment of the present invention, a second embodiment of the present invention provides a WebService transparent proxy method, as shown in fig. 2:
referring to fig. 2, a method for using a WebService transparent proxy includes the following steps:
(21) the service registration module 1 registers an address A of a WebService service 5 to be proxied and a WSDL file acquisition address B of the service;
(22) the service registration module 1 generates a service address X on a proxy system and a WSDL file acquisition address Y of the service for the proxied WebService service 5;
(23) the service monitoring module 3 monitors and receives a request sent by the WebService client 2;
(24) the service monitoring module 3 judges whether the request address of the received WebService client 2 is a service address X or a WSDL file acquisition address Y, if the request address is the service address X, the step (25) is skipped, otherwise, the step (27) is skipped;
(25) the service agent module 4 sends the request data to the address A of the proxied WebService service 5 according to the registration information to obtain the response information of the WebService service 5;
(26) the response information of the WebService service 5 is returned to the WebService client 2 through the service monitoring module 3, and the service agent process is ended
(27) The service agent module 4 accesses the WSDL file of the proxied WebService 5 to acquire the address B according to the registration information, and acquires the WSDL content of the proxied service;
(28) the service agent module 4 replaces the service address a of the WebService service 5 appearing in the WSDL content acquired in the step (27) with the service address X generated in the step (22) according to the information registered in the step (21) and the step (22) by the service registration module 1, and generates a modified WSDL content;
(29) the service agent module 4 returns the modified WSDL content to the WebService client 2 through the service monitoring module 3, and the service agent process is finished.
As a further optimization of the above scheme, since the WSDL information is not changed after the WebService service 5 is released, the present invention preferably caches the modified WSDL content after the step (28) is finished, so that when the next step is reached to the step (27), the subsequent processing is skipped, and the cached modified WSDL content is directly returned, thereby effectively improving the system operation performance.
The invention also discloses a device, comprising:
one or more processors;
memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a WebService proxy system and transparent proxy method thereof of any of claims 1-3.
The present invention also discloses a computer-readable storage medium storing a computer program which, when executed by a processor, implements a WebService proxy system and a transparent proxy method thereof according to any one of claims 1 to 3.
In addition, the present embodiment also provides a computer-readable storage medium storing a computer program, which when executed by a processor implements a WebService proxy system and a transparent proxy method thereof of the present embodiment. The computer readable storage medium may be the computer readable storage medium contained in the system or apparatus described in the above embodiments; or may be a separate computer-readable storage medium that is not incorporated into the device, such as a hard disk, optical disk, SD card, etc.
The invention discloses a WebService agent system and a transparent agent method thereof.A service registration module registers and registers the real address of a WebService service and a WSDL information address to generate a virtual service address and stores the information to a data server, a service monitoring module is responsible for opening an HTTP port and monitoring a service calling request and a WSDL file request sent by a WebService client, and a service agent module is responsible for forwarding the received client request to the real WebService server and modifying data returned by the WebService server based on the information in the data server and then forwarding the modified data to the WebService client through the service monitoring module. According to the WebService agent system and the transparent agent method thereof, the client does not need to know the real service information of the back end of the client, and the server does not need to modify the WSDL information of the client because of being acted, so that client developers do not need to consider factors such as address conversion and the like, can directly generate the WebService client according to the WSDL content provided by the agent system and directly call the WebService client, do not need to manually adjust codes, and can effectively improve the development efficiency and the implementation efficiency of the deployment and access of the agent platform.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (4)

1. The WebService agent system is characterized by comprising a WebService client, a service registration module, a service monitoring module, a service agent module, a WebService server and a data server:
the WebService client is used for sending a service calling request and a WSDL file request;
the service registration module registers and registers the real address of the WebService service and the information address of the WSDL file, generates a virtual service address and stores the information to the data server;
the service monitoring module is responsible for opening the HTTP port and monitoring a service calling request and a WSDL file request sent by the WebService client;
the service agent module is responsible for forwarding the received client request to a real WebService server;
the WebService server is used for receiving the WebService client request forwarded by the service agent module;
the data server is used for storing the address of the WebService service, the WSDL information address and the virtual service address;
the WebService client, the service registration module, the service monitoring module, the service proxy module, the WebService server and the data server perform the WebService transparent proxy method, and the method comprises the following steps:
(21) the service registration module registers and registers the address of the WebService service needing to be proxied and the WSDL file acquisition address of the service;
(22) the service registration module generates a service address on the proxy system and a WSDL (wireless sensor link layer definition) file acquisition address of the service for the WebService service to be proxied;
(23) the service monitoring module monitors and receives a request sent by the WebService client;
(24) the service monitoring module judges whether the request address of the received WebService client is a service address or a WSDL file acquisition address, if the request address is the service address, the step (25) is skipped, otherwise, the step (27) is skipped;
(25) the service agent module sends the request data to the address of the WebService to be proxied according to the registration information to obtain response information of the WebService;
(26) returning response information of the WebService service to the WebService client through the service monitoring module, and ending the service agent process;
(27) the service agent module accesses the WSDL file of the proxied WebService service to acquire an address according to the registration information, and acquires the WSDL content of the proxied WebService service;
(28) the service proxy module replaces the service address of the WebService service appearing in the WSDL content acquired in the step (27) with the service address generated in the step (22) according to the information registered in the step (21) and the step (22) by the service registration module to generate modified WSDL content;
(29) the service agent module returns the modified WSDL content to the WebService client through the service monitoring module, and the service agent process is finished.
2. The WebService agent system of claim 1, wherein the service agent module modifies data returned by the WebService server based on information in the data server and forwards the modified data to the WebService client via the service monitoring module.
3. A WebService proxy device, the device comprising:
one or more processors;
memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a WebService proxy system as recited in any of claims 1-2.
4. A computer-readable storage medium storing a computer program, wherein the program, when executed by a processor, implements a WebService proxy system as claimed in any one of claims 1-2.
CN201811300136.9A 2018-11-02 2018-11-02 WebService agent system and transparent agent method thereof Active CN109451014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811300136.9A CN109451014B (en) 2018-11-02 2018-11-02 WebService agent system and transparent agent method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811300136.9A CN109451014B (en) 2018-11-02 2018-11-02 WebService agent system and transparent agent method thereof

Publications (2)

Publication Number Publication Date
CN109451014A CN109451014A (en) 2019-03-08
CN109451014B true CN109451014B (en) 2021-02-05

Family

ID=65549632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811300136.9A Active CN109451014B (en) 2018-11-02 2018-11-02 WebService agent system and transparent agent method thereof

Country Status (1)

Country Link
CN (1) CN109451014B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865868B (en) * 2019-04-24 2022-08-12 顺丰科技有限公司 Cross-network regional service calling method and system
CN111641696B (en) * 2020-05-21 2023-05-09 远光软件股份有限公司 WebService service registration and treatment method and system based on distributed system environment
CN112291380A (en) * 2020-09-01 2021-01-29 上海泛微软件有限公司 Network request processing method, device, equipment and computer readable storage medium
CN113377621B (en) * 2021-07-01 2022-08-02 武汉斗鱼鱼乐网络科技有限公司 Data monitoring method and device, storage medium and electronic equipment
CN113973105B (en) * 2021-10-18 2023-06-16 湖南大学 System and method for simplifying SOAP message on service bus
CN115277659B (en) * 2022-07-04 2024-04-12 浪潮软件股份有限公司 Method and system based on APISIX proxy Web service interface

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534324A (en) * 2009-04-14 2009-09-16 河北全通通信有限公司 Dynamic invocation method of DotNet platform-based pluggable Web service
CN101621516A (en) * 2009-08-10 2010-01-06 浙江大学 Interactive method for enterprise service bus and external Web service
CN102130965A (en) * 2011-04-13 2011-07-20 北京邮电大学 Method and system for dynamically combining services based on rule engine
CN102624881A (en) * 2012-02-29 2012-08-01 浙江大学 Mobile-device-oriented service cache system architecture and development method
CN102790684A (en) * 2011-05-16 2012-11-21 中国移动通信集团北京有限公司 Service information invocation method and system and enterprise service bus server
CN103581310A (en) * 2013-10-24 2014-02-12 深圳市远行科技有限公司 Automatic generating method for web service agent
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN106453288A (en) * 2016-09-29 2017-02-22 上海和付信息技术有限公司 Asynchronous mode supporting distributed micro service framework system and implementation method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711832B1 (en) * 2003-09-22 2010-05-04 Actional Corporation Enabling existing desktop applications to access web services through the use of a web service proxy
US20070255719A1 (en) * 2006-04-28 2007-11-01 Sap Ag Method and system for generating and employing a generic object access model

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534324A (en) * 2009-04-14 2009-09-16 河北全通通信有限公司 Dynamic invocation method of DotNet platform-based pluggable Web service
CN101621516A (en) * 2009-08-10 2010-01-06 浙江大学 Interactive method for enterprise service bus and external Web service
CN102130965A (en) * 2011-04-13 2011-07-20 北京邮电大学 Method and system for dynamically combining services based on rule engine
CN102790684A (en) * 2011-05-16 2012-11-21 中国移动通信集团北京有限公司 Service information invocation method and system and enterprise service bus server
CN102624881A (en) * 2012-02-29 2012-08-01 浙江大学 Mobile-device-oriented service cache system architecture and development method
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN103581310A (en) * 2013-10-24 2014-02-12 深圳市远行科技有限公司 Automatic generating method for web service agent
CN106453288A (en) * 2016-09-29 2017-02-22 上海和付信息技术有限公司 Asynchronous mode supporting distributed micro service framework system and implementation method thereof

Also Published As

Publication number Publication date
CN109451014A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109451014B (en) WebService agent system and transparent agent method thereof
US8375122B2 (en) Web service information management in service-oriented architecture applications
EP3837604B1 (en) In situ triggered function as a service within a service mesh
CN110351283B (en) Data transmission method, device, equipment and storage medium
CN111290865A (en) Service calling method and device, electronic equipment and storage medium
KR102341809B1 (en) System and method for supporting a bypass-domain model and a proxy model and updating service information for across-domain messaging in a transactional middleware machine environment
US20070124475A1 (en) Creating proxies from service description metadata at runtime
CN102624881B (en) Mobile-device-oriented service cache system architecture and development method
CN111163166B (en) Enterprise service bus system
CN110784360A (en) Method and system for realizing Kong declarative configuration hot update
US8230448B2 (en) Methods, systems and computer program products for web service interaction with a resource management system
CN114205342B (en) Service debugging routing method, electronic equipment and medium
CN112637332B (en) Service registration discovery method and system
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN113973129A (en) Gateway supporting multiple registration center microservices
CN109413224B (en) Message forwarding method and device
CN113268308A (en) Information processing method, device and storage medium
CN116805946A (en) Message request processing method and device, electronic equipment and storage medium
CN116204239A (en) Service processing method, device and computer readable storage medium
CN116633993B (en) Cross-network micro-service calling method, device, equipment and storage medium
US10402307B2 (en) System and method for providing runtime tracing for a web-based client accessing a transactional middleware platform using an extension interface
WO2021093671A1 (en) Task processing method, system, apparatus and device, and computer readable storage medium
CN112702441B (en) Container-based access data processing method, device, system and storage medium
CN114327823A (en) Method, system, terminal and storage medium for calling resources of micro-service cluster
US10536508B2 (en) Flexible data communication

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
TR01 Transfer of patent right

Effective date of registration: 20220817

Address after: Room 403, No. 355, Wenqu Road, High-tech Zone, Hefei City, Anhui Province, 230094

Patentee after: Anhui Zhongke guochuanggao trusted software Co.,Ltd.

Address before: No. 355, Wenqu Road, hi tech Zone, Hefei City, Anhui Province

Patentee before: USTC SINOVATE SOFTWARE CO.,LTD.

TR01 Transfer of patent right