CN111988171A - Method, proxy server and system for calling SOAP Web service based on RESTful style request - Google Patents

Method, proxy server and system for calling SOAP Web service based on RESTful style request Download PDF

Info

Publication number
CN111988171A
CN111988171A CN202010809573.4A CN202010809573A CN111988171A CN 111988171 A CN111988171 A CN 111988171A CN 202010809573 A CN202010809573 A CN 202010809573A CN 111988171 A CN111988171 A CN 111988171A
Authority
CN
China
Prior art keywords
soap
style
web service
service
restful
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
CN202010809573.4A
Other languages
Chinese (zh)
Other versions
CN111988171B (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 Guoxin Cloud Service Co ltd
Nanjing Boya Blockchain Research Institute Co ltd
Peking University
Original Assignee
Beijing Guoxin Cloud Service Co ltd
Nanjing Boya Blockchain Research Institute Co ltd
Peking University
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 Guoxin Cloud Service Co ltd, Nanjing Boya Blockchain Research Institute Co ltd, Peking University filed Critical Beijing Guoxin Cloud Service Co ltd
Priority to CN202010809573.4A priority Critical patent/CN111988171B/en
Publication of CN111988171A publication Critical patent/CN111988171A/en
Application granted granted Critical
Publication of CN111988171B publication Critical patent/CN111988171B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0273Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
    • 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
    • H04L67/562Brokering 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/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
    • H04L67/63Routing a service request depending on the request content or context

Abstract

The invention provides a method, a proxy server and a system for calling SOAP Web service based on RESTful style requests, wherein the method comprises the following steps: the client sends a storage address and a project name of an interface description document of a SOAP style of the SOAP Web Service to the proxy server, the proxy server generates an interface description document of a RESTful style and a key information object of the SOAP Web Service based on the interface description document of the SOAP style and the project name, the client generates a call request of the RESTful style, the proxy server generates a call request of the SOAP style based on the call request of the RESTful style and the key information object of the SOAP Web Service, the SOAP Web Service server generates Service data of an XML format in response to the call request of the SOAP style, and the proxy server converts the Service data of the XML format into Service data of a JSON format and then returns the Service data to the client. By additionally arranging the proxy server, a developer can directly use a RESTful-style Service call request to call the SOAP Web Service on the SOAP Web Service server, so that the development efficiency of the RESTful project is remarkably improved.

Description

Method, proxy server and system for calling SOAP Web service based on RESTful style request
Technical Field
The invention relates to the technical field of communication, in particular to a method, a proxy server and a system for calling SOAP Web service based on RESTful style requests.
Background
The simple object access protocol application programming interface (SOAP API) is an interface for realizing interconnection and intercommunication among application software systems based on a Web Service mechanism, and the SOAP API enables application software developed based on different operating systems and different languages to conveniently realize the intercommunication.
The tabular form-lined state transfer application programming interface (REST API) is a common interoperation interface between Web application capabilities based on the internet, namely, an API conforming to the REST style, and a system corresponding to the API conforming to the REST style is a REST style system, wherein the REST style system is characterized by comprising: the information opened to the outside is resources, and the resources are identified by Universal Resource Identifiers (URIs) of the conventional WEB technology. Compared with SOAP Web services, RESTful Web services are more lightweight and simpler in data description, and thus various RESTful Web services are increasingly popular.
Although restful Web services are becoming more and more popular, there are still a large number of SOAP Web services that are often used. When a developer develops a new project based on RESTful style, the developer still needs to call the SOAP Web service, and in order to realize the call of the SOAP Web service, the developer needs to additionally construct a SOAPclient in a development program. This approach significantly increases the difficulty of developing the project.
Disclosure of Invention
In order to solve the above technical problem, a first aspect of the present invention provides a method for invoking a SOAP Web service based on a RESTful style request, where the method includes:
a method for calling SOAP Web Service based on RESTful style request is applied to a system for calling SOAP Web Service based on RESTful style request, the system comprises a client, a proxy server and a SOAP Web Service server, and the method comprises the following steps:
the client sends the storage address and the project name of the SOAP style interface description document of the SOAP Web service to the proxy server, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
the proxy server acquires an interface description document in a SOAP style according to a storage address, and generates an interface description document in a RESTful style and a key information object of SOAP Web service based on the interface description document in the SOAP style and the project name;
the proxy server sends the RESTful style interface description document to the client;
the client generates a RESTful-style service calling request based on the RESTful-style interface description document, and sends the generated RESTful-style service calling request to the proxy server;
the proxy server generates a SOAP-style Service calling request based on the RESTful-style Service calling request and the key information object of the SOAP Web Service, and sends the generated SOAP-style Service calling request to the SOAP Web Service server;
the SOAP Web Service server responds to the SOAP style Service call request to generate Service data in an XML format and sends the generated Service data in the XML format to the proxy server;
and the proxy server generates service data in a JSON format based on the service data in the XML format and sends the service data in the JSON format to the client.
The second aspect of the present invention provides a method for invoking SOAP Web services based on RESTful style requests, which has the following technical scheme:
a method for calling SOAP Web Service based on RESTful style request is operated on a proxy server, the proxy server is applied to a system for calling SOAP Web Service based on RESTful style request, the system also comprises a client and a SOAP Web Service server, and the method comprises the following steps:
acquiring a storage address and an item name of a SOAP style interface description document of a SOAP Web service sent by a client, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
acquiring the SOAP-style interface description document according to the storage address, and generating a RESTful-style interface description document and a key information object of SOAP Web service based on the SOAP-style interface description document and the project name;
sending the RESTful style interface description document to the client;
acquiring a RESTful style service call request generated by the RESTful style-based interface description document sent by the client;
generating a service calling request in a SOAP style based on the RESTful style service calling request and the key information object of the SOAP Web service;
sending the generated Service call request of the SOAP style to the SOAP Web Service server to trigger the SOAP Web Service server to generate Service data in an XML format;
acquiring the Service data in the XML format sent by the SOAP Web Service server;
generating service data in a JSON format based on the service data in the XML format;
and sending the service data in the JSON format to the client.
The third aspect of the present invention provides a proxy server, which has the following technical scheme:
a proxy server for use in a system for invoking SOAP Web services based on RESTful style requests, the system further comprising a client and a SOAP Web Service server, the proxy server comprising:
the first acquisition module is used for acquiring the storage address and the project information of the SOAP style interface description document of the SOAP Web service sent by the client, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
the first generation module is used for acquiring the interface description document in the SOAP style according to the storage address and generating an interface description document in the RESTful style and a key information object of the SOAP Web service based on the interface description document in the SOAP style and the project name;
the first sending module is used for sending the RESTful style interface description document to the client;
the second acquisition module is used for acquiring a RESTful-style service call request generated by the RESTful-style interface description document and sent by the client;
the second generation module is used for generating a service calling request in a SOAP style based on the RESTful-style service calling request and the key information object of the SOAP Web service;
the second sending module is used for sending the generated SOAP-style Service calling request to the SOAP Web Service server so as to trigger the SOAP Web Service server to generate Service data in an XML format;
the third acquisition module is used for acquiring the Service data in the XML format sent by the SOAP Web Service server;
the third generation module is used for generating service data in a JSON format based on the service data in the XML format;
and the third sending module is used for sending the service data in the JSON format to the client.
The fourth aspect of the present invention provides a system for invoking SOAP Web services based on RESTful style requests, which has the following technical solution:
a system for invoking SOAP Web services based on RESTful style requests, the system comprising a client, a proxy server and a SOAP Web Service server, wherein:
the client sends the storage address and the project name of the SOAP style interface description document of the SOAP Web service to the proxy server, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
the proxy server acquires an interface description document in a SOAP style according to a storage address, and generates an interface description document in a RESTful style and a key information object of SOAP Web service based on the interface description document in the SOAP style and the project name;
the proxy server sends the RESTful style interface description document to the client;
the client generates a RESTful-style service calling request based on the RESTful-style interface description document, and sends the generated RESTful-style service calling request to the proxy server;
the proxy server generates a SOAP-style Service calling request based on the RESTful-style Service calling request and the key information object of the SOAP Web Service, and sends the generated SOAP-style Service calling request to the SOAP Web Service server;
the SOAP Web Service server responds to the SOAP style Service call request to generate Service data in an XML format and sends the generated Service data in the XML format to the proxy server;
and the proxy server generates service data in a JSON format based on the service data in the XML format and sends the service data in the JSON format to the client.
Therefore, the proxy server is constructed between the client and the SOAP Web Service server, so that when a developer develops an RESTful-style project through the client, the developer can directly call the SOAP Web Service on the SOAP Web Service server by using the RESTful-style Service call request without additionally constructing a SOAPclient in a program code, and the project development efficiency of the developer is improved.
Drawings
FIG. 1 is a flowchart of information interaction within a system of a method for invoking SOAP Web services in a RESTful style request in accordance with an embodiment of the present invention;
fig. 2 is a processing flowchart of a method for invoking a SOAP Web service based on a RESTful style request on a server according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a process of invoking a SOAP Web service based on a RESTful style request on a server according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a process of invoking a SOAP Web service based on a RESTful style request on a server according to an embodiment of the present invention;
FIG. 5 is a block diagram of a proxy server for invoking SOAP Web services based on RESTful style requests, according to an embodiment of the present invention;
fig. 6 is a block diagram illustrating a proxy server for invoking SOAP Web services based on RESTful style requests according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The embodiment of the invention provides a method, a proxy server and a system for calling SOAP Web Service based on RESTful style requests, so that when a developer develops RESTful style projects, the developer can directly call SOAP Web Service on a SOAP Web Service server without additionally constructing SOAPclient in a program code, and the project development efficiency of the developer is improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the invention applies to a system for invoking SOAP Web services based on RESTful style requests, comprising at least one developer side, at least one proxy server and at least one SOAP Web Service server.
For convenience of understanding, please refer to fig. 1, where fig. 1 is a schematic diagram of an interactive embodiment of a method for invoking a SOAP Web service based on a RESTful style request in an embodiment of the present invention, and as shown in the diagram, the method specifically includes:
201. the client sends the storage address and the project name of the SOAP style interface description document of the SOAP Web service to the proxy server, wherein: the SOAP Web Service is provided by a SOAP Web Service server, and the SOAP-style interface description document is a WSDL document.
SOAP-style interface descriptions are typically stored on a network or locally in a file system. When developing a RESTful-style project, a developer firstly inputs the address and the project name of a SOAP-style interface description document corresponding to the SOAP Web service to be used to a client.
The storage address is a URL if the interface description document is stored on the network, and a file system access path if the interface description document is stored in the file system.
In the invention, the project name is used for distinguishing different projects needing to call SOAP Web service. Optionally, the developer inputs the description information of the project to the client together. Project names are typically characterized by short english letters or words.
202. And the proxy server acquires the SOAP-style interface description document according to the storage address, and generates a RESTful-style interface description document and a key information object of the SOAP Web service based on the SOAP-style interface description document and the project name.
As is familiar to those skilled in the art, SOAP style interface description documents are WSDL documents whose document structure has a uniform standard format. After the proxy server acquires the WSDL document through the storage address, the WSDL document is analyzed by using a DOM4j + XPath analysis tool or other analysis tools for analyzing XML structure data, so that information required for generating an RESTful-style interface description document and a key information object of SOAP Web service is acquired.
Step one, analyzing a WSDL document to obtain information required by generating an RESTful style interface description document and a key information object of SOAP Web service, wherein the specific process is as follows:
for wsdl: and extracting the value of the targetNamespace attribute in the definitions tag to obtain a target namespace of the SOAP Web service, wherein the attribute value is required to be carried in a service call request for acquiring the SOAP Web service. Optionally, in this case, the ratio of wsdl: definition under the labels first wsdl: the text content in the documentation tag is extracted, and the text content is an introduction related to the SOAP Web service.
And (3) resolving wsdl: service label wsdl: and (4) under the port label, namely, the value of the location attribute in the address label is the main URL of the SOAP Web service, and each service call request for acquiring the SOAP Web service needs to carry the attribute value.
Analyzing all wsdl under any wsdl: portType label: and obtaining the value of the name attribute in the operation label to obtain all effective method request paths of the SOAP Web service. Optionally, at this time, text content in the wsdl: documentation tag under each wsdl: operation tag may also be extracted, where the text content is a specific description about the corresponding method, and includes introduction of the service function, the request parameter, and the return result.
And analyzing s under a wsdl: type tag, namely s under a schema tag, namely element tags according to the value of the name attribute in the tags to obtain tags with consistent methods, and analyzing the sub-tags s under the tags, namely s under a complete type, s under a sequence tag, namely the content in the element tags to obtain the parameters and types of the corresponding methods. Of course, not all methods exist with parameters and types.
So far, all the information needed to generate RESTful style interface description documents and key information objects of SOAP Web services has been acquired.
Step two, generating an RESTful style interface description document and a key information object of the SOAP Web service based on the acquired information and the project name, wherein the specific process is as follows:
modeling a RESTful style application program interface, wherein the URL of the RESTful style application program interface is generally in the format of IP: port number/API/item name/method request path.
Because the only requests of the SOAP bottom layer to HTTP are in GET and POST modes, only the GET and POST modes need to be constructed when the RESTful style application program interface is modeled. Then, in the obtained effective method, no parameter is constructed in a GET manner, and a parameter is constructed in a POST manner. The two ways of modeling are as follows:
GET mode: URL is IP: port number/API/item name/methodName.
POST mode: URL is IP: port number/API/item name/methodName, and { param1: value1, param2: value2, … } as a requestor.
The item name is the item name sent by the client.
Thus, the modeling of the RESTful style application program interface is completed. And then packaging all application program interface class objects, request paths of effective methods of the SOAP Web service acquired by WSDL document analysis, parameter lists, item description information sent by a client and the like into a final object, storing the final object into a table Map1 maintained by a proxy server by taking the item name as k and the final object as v, serializing the final object into a database, returning the final object to the client in a JSON format, wherein the JSON format final object data is an RESTful style interface description document.
In addition, with the item name k and the key information (including the target namespace and the body URL) on the SOAP Web service v, the key information object of the SOAP Web service is stored in the table Map2 maintained by the proxy server and serialized into the database.
203, the proxy server sends a RESTful style interface description document to the client.
204-205, the client generates a RESTful style service call request based on the RESTful style interface description document, and sends the generated RESTful style service call request to the proxy server.
Specifically, after obtaining the RESTful-style interface description document, the client may use the interface therein according to the prompt of the document to generate a RESTful-style service invocation request.
206-207, the proxy server generates a SOAP-style Service call request based on the RESTful-style Service call request and the key information object of the SOAP Web Service, and sends the generated SOAP-style Service call request to the SOAP Web Service server.
Specifically, after the proxy server obtains a RESTful-style service invocation request, a project name, a method name and a parameter list are obtained from an access path of the service invocation request. And acquires the target namespace and the body URL of the corresponding SOAP Web service from the Map2 based on the project name. Next, the proxy server constructs a SOAP-style service invocation request (SOAPClient) based on the target namespace, body URL, access path, method name, and parameter list of the SOAP Web service.
208-209, the SOAP Web Service server responds to the SOAP style Service call request, generates XML-format Service data and sends the generated XML-format Service data to the proxy server.
210-211, the proxy server generates service data in a JSON format based on the service data in the XML format and sends the service data in the JSON format to the client.
Specifically, the proxy server parses the service data based on the XML format again using DOM4j + XPath parsing tool or some other parsing tools for parsing XML structure data, takes out text contents under all tags, puts the text contents into a List, and finally sends the List to the client in JSON format.
Therefore, by constructing the proxy server between the client and the SOAP Web Service server, when a developer develops a RESTful-style project, the developer can directly use a RESTful-style Service call request to call the SOAP Web Service on the SOAP Web Service server without additionally constructing a SOAPclient in a program code, so that the project development efficiency of the developer is improved.
Since the core processing procedure of the present invention is completed by the proxy server, the following introduces the method of the present invention for invoking SOAP Web service by RESTful style request from the perspective of the proxy server.
Referring to fig. 2, a method for invoking a SOAP Web service by a RESTful style request in an embodiment of the present invention runs on a proxy server, and the embodiment includes:
101. acquiring a storage address and an item name of a SOAP style interface description document of a SOAP Web service sent by a client, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document.
102. And acquiring the SOAP-style interface description document according to the storage address, and generating a RESTful-style interface description document and a key information object of SOAP Web service based on the SOAP-style interface description document and the project name.
As shown in fig. 3, step 102 optionally includes the following sub-steps:
1021. acquiring an interface description document of the SOAP style according to the storage address;
1022. analyzing the interface description document in the SOAP style, and acquiring a target namespace, a main URL (uniform resource locator) of the SOAP Web service and a request path and a parameter list of all effective methods contained in the SOAP Web service;
1023. and generating an RESTful-style interface description document based on the acquired project name, request paths of all effective methods contained in the SOAP Web service and a parameter list, and generating a key information object of the SOAP Web service based on the project name, a target name space of the SOAP Web service and a main URL.
The specific implementation process of step 102 is the same as that of step 202 in the foregoing, and is not described here again.
103. And sending the RESTful style interface description document to the client.
104. And acquiring a RESTful style service call request generated by the RESTful style-based interface description document sent by the client.
105. And generating a SOAP-style service calling request based on the RESTful-style service calling request and the key information object of the SOAP Web service.
As shown in fig. 5, step 105 optionally includes the following sub-steps:
1051. acquiring a project name, a method name and a parameter list according to an access path of the RESTful style service calling request, and acquiring a target namespace and a main URL of the SOAP Web service from a key information object of the SOAP Web service based on the project name;
1052. and generating a SOAP-style service calling request based on the item name, the method name, the parameter list, the target name space of the SOAP Web service and the main URL.
The specific implementation process of step 105 is the same as that of step 206 in the foregoing, and is not described herein again.
106. And sending the generated Service call request of the SOAP style to the SOAP Web Service server to trigger the SOAP Web Service server to generate Service data in an XML format.
107. Acquiring the Service data in the XML format sent by the SOAP Web Service server;
108. and generating service data in a JSON format based on the service data in the XML format.
The specific implementation process of step 108 is the same as that of step 210 in the foregoing, and is not described herein again.
109. And sending the service data in the JSON format to the client.
An embodiment of the present invention further provides a proxy server, where the proxy server is applied to a system for invoking a SOAP Web Service in a RESTful style request, and the system further includes a client and a SOAP Web Service server, and as shown in fig. 5, the proxy server includes:
a first obtaining module 11, configured to obtain a storage address and item information of a SOAP-style interface description document of a SOAP Web service sent by a client, where: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
the first generating module 12 is configured to obtain the interface description document in the SOAP style according to the storage address, and generate an interface description document in a RESTful style and a key information object of a SOAP Web service based on the interface description document in the SOAP style and the project name.
Optionally, the first generating module 12 includes the following sub-modules:
the first obtaining submodule 121 is configured to obtain the interface description document in the SOAP style according to the storage address;
a second obtaining submodule 122, configured to parse the interface description document in the SOAP style, and obtain a target namespace and a main URL of the SOAP Web service, and a request path and a parameter list of all effective methods included in the SOAP Web service;
the first generating submodule 123 is configured to generate a RESTful-style interface description document based on the acquired project name, request paths of all effective methods included in the SOAP Web service, and a parameter list, and generate a key information object of the SOAP Web service based on the project name, a target namespace of the SOAP Web service, and a body URL.
A first sending module 13, configured to send the RESTful-style interface description document to the client;
a second obtaining module 14, configured to obtain a RESTful style service invocation request generated based on the RESTful style interface description document sent by the client;
a second generating module 15, configured to generate a service invocation request in a SOAP style based on the RESTful style service invocation request and the key information object of the SOAP Web service;
optionally, the second generating module 15 includes the following sub-modules:
a third obtaining sub-module 151, configured to obtain a project name, a method name, and a parameter list according to an access path of the RESTful-style service invocation request, and obtain a target namespace and a main URL of the SOAP Web service from a key information object of the SOAP Web service based on the project name;
a second generating submodule 152, configured to generate a SOAP-style service invocation request based on the item name, the method name, the parameter list, a target namespace of the SOAP Web service, and a body URL.
A second sending module 16, configured to send the generated SOAP-style Service invocation request to the SOAP Web Service server to trigger the SOAP Web Service server to generate Service data in an XML format;
a third obtaining module 17, configured to obtain the Service data in the XML format sent by the SOAP Web Service server;
a third generating module 18, configured to generate service data in a JSON format based on the service data in the XML format;
a third sending module 19, configured to send the service data in the JSON format to the client.
The invention has been described above with a certain degree of particularity. It will be understood by those of ordinary skill in the art that the description of the embodiments is merely exemplary and that all changes that come within the true spirit and scope of the invention are desired to be protected. The scope of the invention is defined by the appended claims rather than by the foregoing description of the embodiments.

Claims (10)

1. A method for calling SOAP Web Service based on RESTful style request is applied to a system for calling SOAP Web Service based on RESTful style request, the system comprises a client, a proxy server and a SOAP Web Service server, and the method comprises the following steps:
the client sends the storage address and the project name of the SOAP style interface description document of the SOAP Web service to the proxy server, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
the proxy server acquires an interface description document in a SOAP style according to a storage address, and generates an interface description document in a RESTful style and a key information object of SOAP Web service based on the interface description document in the SOAP style and the project name;
the proxy server sends the RESTful style interface description document to the client;
the client generates a RESTful-style service calling request based on the RESTful-style interface description document, and sends the generated RESTful-style service calling request to the proxy server;
the proxy server generates a SOAP-style Service calling request based on the RESTful-style Service calling request and the key information object of the SOAP Web Service, and sends the generated SOAP-style Service calling request to the SOAP Web Service server;
the SOAP Web Service server responds to the SOAP style Service call request to generate Service data in an XML format and sends the generated Service data in the XML format to the proxy server;
and the proxy server generates service data in a JSON format based on the service data in the XML format and sends the service data in the JSON format to the client.
2. The method of claim 1, wherein the proxy server generating a RESTful-style interface description and a key information object of a SOAP Web service based on the SOAP-style interface description and the project name comprises:
the proxy server analyzes the interface description document in the SOAP style, and acquires a target namespace and a main URL of the SOAP Web service and request paths and parameter lists of all effective methods contained in the SOAP Web service;
and the proxy server generates an RESTful-style interface description document based on the acquired project name, request paths of all effective methods contained in the SOAP Web service and a parameter list, and generates a key information object of the SOAP Web service based on the project name, a target name space of the SOAP Web service and a main URL.
3. The method of claim 1, wherein generating, by the proxy server, a SOAP-style service invocation request based on the RESTful-style service invocation request and the key information object of the SOAP Web service comprises:
the proxy server acquires a project name, a method name and a parameter list according to an access path of the RESTful style service call request, and acquires a target namespace and a main URL of the SOAP Web service from a key information object of the SOAP Web service based on the project name;
and the proxy server generates a SOAP-style service calling request based on the project name, the method name, the parameter list, the target namespace of the SOAP Web service and the body URL.
4. A method for invoking SOAP Web Service based on RESTful style request is characterized in that the method runs on a proxy server, the proxy server is applied to a system for invoking SOAP Web Service based on RESTful style request, the system further comprises a client and a SOAP Web Service server, and the method comprises the following steps:
acquiring a storage address and an item name of a SOAP style interface description document of a SOAP Web service sent by a client, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
acquiring the SOAP-style interface description document according to the storage address, and generating a RESTful-style interface description document and a key information object of SOAP Web service based on the SOAP-style interface description document and the project name;
sending the RESTful style interface description document to the client;
acquiring a RESTful style service call request generated by the RESTful style-based interface description document sent by the client;
generating a service calling request in a SOAP style based on the RESTful style service calling request and the key information object of the SOAP Web service;
sending the generated Service call request of the SOAP style to the SOAP Web Service server to trigger the SOAP Web Service server to generate Service data in an XML format;
acquiring the Service data in the XML format sent by the SOAP Web Service server;
generating service data in a JSON format based on the service data in the XML format;
and sending the service data in the JSON format to the client.
5. The method of claim 4, wherein the obtaining the SOAP-style interface description from the storage address and generating a RESTful-style interface description and a key information object of a SOAP Web service based on the SOAP-style interface description and the project name comprises:
acquiring an interface description document of the SOAP style according to the storage address;
analyzing the interface description document in the SOAP style, and acquiring a target namespace, a main URL (uniform resource locator) of the SOAP Web service and a request path and a parameter list of all effective methods contained in the SOAP Web service;
and generating an RESTful-style interface description document based on the acquired project name, request paths of all effective methods contained in the SOAP Web service and a parameter list, and generating a key information object of the SOAP Web service based on the project name, a target name space of the SOAP Web service and a main URL.
6. The method of claim 4, wherein generating the RESTful-style service invocation request based on the RESTful-style service invocation request and the key information object of the SOAP Web service comprises:
acquiring a project name, a method name and a parameter list according to an access path of the RESTful style service calling request, and acquiring a target namespace and a main URL of the SOAP Web service from a key information object of the SOAP Web service based on the project name;
and generating a SOAP-style service calling request based on the item name, the method name, the parameter list, the target name space of the SOAP Web service and the main URL.
7. A proxy server, wherein the proxy server is applied to a system for invoking a SOAP Web Service based on a RESTful style request, the system further comprises a client and a SOAP Web Service server, and the proxy server comprises:
the first acquisition module is used for acquiring the storage address and the project information of the SOAP style interface description document of the SOAP Web service sent by the client, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
the first generation module is used for acquiring the interface description document in the SOAP style according to the storage address and generating an interface description document in the RESTful style and a key information object of the SOAP Web service based on the interface description document in the SOAP style and the project name;
the first sending module is used for sending the RESTful style interface description document to the client;
the second obtaining module is used for obtaining a RESTful-style service calling request generated by the RESTful-style interface description document and sent by the client;
a second generation module, configured to generate a service invocation request in a SOAP style based on the RESTful style service invocation request and the key information object of the SOAP Web service;
the second sending module is used for sending the generated SOAP-style Service calling request to the SOAP Web Service server so as to trigger the SOAP Web Service server to generate XML-format Service data;
a third obtaining module, configured to obtain the Service data in the XML format sent by the SOAP Web Service server;
the third generation module is used for generating service data in a JSON format based on the service data in the XML format;
and the third sending module is used for sending the service data in the JSON format to the client.
8. The proxy server of claim 7, wherein the first generation module comprises:
the first obtaining submodule is used for obtaining the interface description document of the SOAP style according to the storage address;
the second obtaining submodule is used for analyzing the interface description document in the SOAP style, and obtaining a target name space and a main URL of the SOAP Web service and request paths and parameter lists of all effective methods contained in the SOAP Web service;
and the first generation submodule is used for generating an RESTful-style interface description document based on the acquired project name, request paths of all effective methods contained in the SOAP Web service and a parameter list, and generating a key information object of the SOAP Web service based on the project name, a target name space of the SOAP Web service and a main URL.
9. The proxy server of claim 7, wherein the second generating module comprises:
a third obtaining submodule, configured to obtain a project name, a method name, and a parameter list according to an access path of the RESTful-style service invocation request, and obtain a target namespace and a main URL of the SOAP Web service from a key information object of the SOAP Web service based on the project name;
and the second generation submodule is used for generating a service calling request in a SOAP style based on the project name, the method name, the parameter list, the target name space of the SOAP Web service and the main URL.
10. A system for invoking SOAP Web services based on RESTful style requests, the system comprising a client, a proxy server and a SOAP Web Service server, wherein:
the client sends the storage address and the project name of the SOAP style interface description document of the SOAP Web service to the proxy server, wherein: the SOAP Web Service is provided by the SOAP Web Service server, and the SOAP-style interface description document is a WSDL document;
the proxy server acquires an interface description document in a SOAP style according to a storage address, and generates an interface description document in a RESTful style and a key information object of SOAP Web service based on the interface description document in the SOAP style and the project name;
the proxy server sends the RESTful style interface description document to the client;
the client generates a RESTful-style service calling request based on the RESTful-style interface description document, and sends the generated RESTful-style service calling request to the proxy server;
the proxy server generates a SOAP-style Service calling request based on the RESTful-style Service calling request and the key information object of the SOAP Web Service, and sends the generated SOAP-style Service calling request to the SOAP Web Service server;
the SOAP Web Service server responds to the SOAP style Service call request to generate Service data in an XML format and sends the generated Service data in the XML format to the proxy server;
and the proxy server generates service data in a JSON format based on the service data in the XML format and sends the service data in the JSON format to the client.
CN202010809573.4A 2020-08-12 2020-08-12 Method, proxy server and system for calling SOAP Web service based on RESTful style request Active CN111988171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010809573.4A CN111988171B (en) 2020-08-12 2020-08-12 Method, proxy server and system for calling SOAP Web service based on RESTful style request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010809573.4A CN111988171B (en) 2020-08-12 2020-08-12 Method, proxy server and system for calling SOAP Web service based on RESTful style request

Publications (2)

Publication Number Publication Date
CN111988171A true CN111988171A (en) 2020-11-24
CN111988171B CN111988171B (en) 2022-05-17

Family

ID=73434944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010809573.4A Active CN111988171B (en) 2020-08-12 2020-08-12 Method, proxy server and system for calling SOAP Web service based on RESTful style request

Country Status (1)

Country Link
CN (1) CN111988171B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565215A (en) * 2020-11-25 2021-03-26 电信科学技术第十研究所有限公司 REST application architecture and construction method based on distributed service agent
CN114051058A (en) * 2021-09-27 2022-02-15 北京旷视科技有限公司 Interface calling method, platform, electronic equipment and computer storage medium
CN115037807A (en) * 2022-06-10 2022-09-09 湖南大学 Method and system for integrating DDS (direct digital synthesis) protocol on industrial robot service bus
CN115225476A (en) * 2022-07-08 2022-10-21 武汉众邦银行股份有限公司 Transmission method and device based on SOA architecture integrated deployment
CN115277659A (en) * 2022-07-04 2022-11-01 浪潮软件股份有限公司 Method and system for acting Web service interface based on APISIX
CN115509647A (en) * 2022-11-21 2022-12-23 深圳市蓝凌软件股份有限公司 API (application program interface) access method, conversion method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764837A (en) * 2009-12-23 2010-06-30 宁波东海蓝帆科技有限公司 Web service dynamic calling system and method
US20110238851A1 (en) * 2010-03-26 2011-09-29 Linkage Technology Group Co., Ltd. Soap Client Protocol Encapsulation Based on TCP
CN104580342A (en) * 2014-08-01 2015-04-29 南京坦道信息科技有限公司 Extendable and completely self-defined unified interface service platform
US9558164B1 (en) * 2008-12-31 2017-01-31 F5 Networks, Inc. Methods and system for converting WSDL documents into XML schema
CN111064722A (en) * 2019-12-12 2020-04-24 山西云时代技术有限公司 Data sharing method for realizing protocol conversion of set in API mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9558164B1 (en) * 2008-12-31 2017-01-31 F5 Networks, Inc. Methods and system for converting WSDL documents into XML schema
CN101764837A (en) * 2009-12-23 2010-06-30 宁波东海蓝帆科技有限公司 Web service dynamic calling system and method
US20110238851A1 (en) * 2010-03-26 2011-09-29 Linkage Technology Group Co., Ltd. Soap Client Protocol Encapsulation Based on TCP
CN104580342A (en) * 2014-08-01 2015-04-29 南京坦道信息科技有限公司 Extendable and completely self-defined unified interface service platform
CN111064722A (en) * 2019-12-12 2020-04-24 山西云时代技术有限公司 Data sharing method for realizing protocol conversion of set in API mode

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BIPIN UPADHYAYA等: "Migration of SOAP-based services to RESTful services", 《IEEE》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565215A (en) * 2020-11-25 2021-03-26 电信科学技术第十研究所有限公司 REST application architecture and construction method based on distributed service agent
CN114051058A (en) * 2021-09-27 2022-02-15 北京旷视科技有限公司 Interface calling method, platform, electronic equipment and computer storage medium
CN114051058B (en) * 2021-09-27 2024-03-26 北京旷视科技有限公司 Interface calling method, platform, electronic equipment and computer storage medium
CN115037807A (en) * 2022-06-10 2022-09-09 湖南大学 Method and system for integrating DDS (direct digital synthesis) protocol on industrial robot service bus
CN115037807B (en) * 2022-06-10 2023-08-18 湖南大学 Method and system for integrating DDS protocol on industrial robot service bus
CN115277659A (en) * 2022-07-04 2022-11-01 浪潮软件股份有限公司 Method and system for acting Web service interface based on APISIX
CN115277659B (en) * 2022-07-04 2024-04-12 浪潮软件股份有限公司 Method and system based on APISIX proxy Web service interface
CN115225476A (en) * 2022-07-08 2022-10-21 武汉众邦银行股份有限公司 Transmission method and device based on SOA architecture integrated deployment
CN115225476B (en) * 2022-07-08 2023-08-11 武汉众邦银行股份有限公司 Transmission method and device based on SOA architecture integrated deployment
CN115509647A (en) * 2022-11-21 2022-12-23 深圳市蓝凌软件股份有限公司 API (application program interface) access method, conversion method, device, equipment and storage medium
CN115509647B (en) * 2022-11-21 2023-03-03 深圳市蓝凌软件股份有限公司 API (application program interface) access method, conversion method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111988171B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN111988171B (en) Method, proxy server and system for calling SOAP Web service based on RESTful style request
US10331422B1 (en) System and method for generating API devlopment code for integrating platforms
US7761885B2 (en) Task computing
US7836439B2 (en) System and method for extending a component-based application platform with custom services
US20060080336A1 (en) Encapsulation and unified access scheme for components
EP1818820A1 (en) System and method for installing custom services on a component-based application platform
EP2153346B1 (en) Method of deriving web service interfaces from form and table metadata
US20080282222A1 (en) Xml push and remote execution of a wireless applications
US20040015564A1 (en) Method of developing a web service and marketing products or services used in developing a web service
Nguyen et al. Ws2jade: Integrating web service with jade agents
US7509422B2 (en) System and method for locating web services
US7783718B2 (en) Locating services using compiled scopes
US9800475B2 (en) Message oriented construction of web services
US20130318160A1 (en) Device and Method for Sharing Data and Applications in Peer-to-Peer Computing Environment
US20190272169A1 (en) System and method for generating api devlopment code for integrating platforms
US8972487B2 (en) Automated framework for testing enterprise services consumer technologies
CN113419729B (en) Front-end page building method, device, equipment and storage medium based on componentization
Biörnstad et al. Let it flow: Building mashups with data processing pipelines
CN115408169A (en) Remote procedure calling method, device, equipment and readable storage medium
CN101772196A (en) Method and system for processing message sent by mobile terminal and acting server
Bahlool et al. Comparative study between web services technologies: Rest and wsdl
CN114116111A (en) Method, device, equipment and medium for configuring flow node and data processing
Gannouni et al. DSM: a data service middleware for sharing data in peer-to-peer computing environments
CN112925998A (en) Interface data processing method, device and system, electronic equipment and storage medium
Anisimov et al. Distributed circuit CAD systems based on Web services technology

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