CN109086148A - A kind of cross-platform method for calling Web Service service - Google Patents
A kind of cross-platform method for calling Web Service service Download PDFInfo
- Publication number
- CN109086148A CN109086148A CN201810860279.9A CN201810860279A CN109086148A CN 109086148 A CN109086148 A CN 109086148A CN 201810860279 A CN201810860279 A CN 201810860279A CN 109086148 A CN109086148 A CN 109086148A
- Authority
- CN
- China
- Prior art keywords
- web service
- service
- cross
- platform
- calling
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000005540 biological transmission Effects 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 6
- 238000012423 maintenance Methods 0.000 abstract description 3
- 238000005314 correlation function Methods 0.000 abstract description 2
- 230000008878 coupling Effects 0.000 abstract description 2
- 238000010168 coupling process Methods 0.000 abstract description 2
- 238000005859 coupling reaction Methods 0.000 abstract description 2
- 230000018109 developmental process Effects 0.000 description 5
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
- G06F9/548—Object oriented; Remote method invocation [RMI]
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention is more particularly directed to a kind of cross-platform methods for calling Web Service service.The cross-platform method for calling Web Service service, comprising the following steps: firstly, dynamic analysis Web Service URL obtains proxy class example;Then, dynamic sequence image parameter;Dynamic sequence array parameter;Finally, dynamic analysis and executing Web Service method of servicing.The cross-platform method for calling Web Service service, understanding coupling processing is carried out to related urls, method name and parameter, and encapsulate a series of serializing parametric techniques and dynamic analysis compiling implement method, keep related development code specification clean and tidy, maintenance work is simple and clear, correlation function stability and high efficiency significantly reduces the calling development cost of common Web Service interface Overpassing Platform by Using, has good application value.
Description
Technical field
The present invention relates to computer application technology, in particular to a kind of cross-platform calling Web Service service
Method.
Background technique
In traditional software development mode, if developer needs cross-platform calling Web Service service, usually make
With two methods: one is WEB reference is added in IDE, such IDE built-in tool can automatically generate corresponding proxy class letter
Breath, developer need to create proxy class instance objects and are entered by multirow object properties assignment statement organization service method
Then ginseng calls corresponding Web Service method of servicing by proxy class instance objects again, to reach Overpassing Platform by Using mesh
's;Another difference with the first is the mode that proxy class generates, and needs to generate agency by the external tool that IDE is provided
Class, other developments are the same as the first.
There are two drawbacks for traditional mode: first is that the coupled relation between URL, method name and parameter is had cured, once clothes
Business provider's configuration information changes, and needs to update the Web service of reference and Complied executing again;Second is that parametric configuration encodes
Some mechanical is lengthy and jumbled, needs a large amount of parameter object attribute assignment sentence, and code perception is poor, lacks the aesthetic feeling of brevity and lucidity,
Maintenance work is uninteresting complicated.
For traditional Web Service development mode drawback, the invention proposes a kind of cross-platform calling Web Service
The method of service.
Summary of the invention
In order to compensate for the shortcomings of the prior art, the present invention provides a kind of cross-platform calling Web being simple and efficient
The method of Service service.
The present invention is achieved through the following technical solutions:
A kind of cross-platform method for calling Web Service service, which comprises the following steps:
(1) dynamic analysis Web Service URL obtains proxy class example;
(2) dynamic sequence image parameter;
(3) dynamic sequence array parameter;
(4) dynamic analysis and Web Service method of servicing is executed.
The step (1) specifically includes the following steps:
(a) it is automatically parsed according to Web Service URL and generates WSDL memory file;
(b) it is automatically generated according to WSDL memory file and default namespace and acts on behalf of category code;
(c) according to act on behalf of category code automatically compile generate proxy class procedure set;
(d) proxy class example is automatically created according to proxy class procedure set.
The step (2) specifically includes the following steps:
(a) specified parameter type instance objects are created;
(b) instance objects attribute information is parsed and according to the corresponding relationship assignment of attribute-name and DataRow column name;
(c) assignment of boolean properties in instance objects is handled to solve data cross-platform transmission problem;
(d) instance objects are returned.
The step (3) specifically includes the following steps:
(a) ArrayList example is created;
(b) traversal DataTable according to DataRow and specified parameter type obtain instance objects and be filled with to
ArrayList example;
(c) instance objects array is returned.
The step (4) specifically includes the following steps:
(a) according to specified Web Service method name acquisition methods information;
(b) according to DataTable or DataRow and method parameter type acquisition methods parameter object;
(c) Web Service method is called in reflection.
The beneficial effects of the present invention are: the cross-platform method for calling Web Service service, to related urls, method name
Understanding coupling processing is carried out with parameter, and encapsulates a series of serializing parametric techniques and dynamic analysis compiling implement method, is made
Related development code specification is clean and tidy, and maintenance work is simple and clear, and correlation function stability and high efficiency significantly reduces common Web
The calling development cost of Service interface Overpassing Platform by Using has good application value.
Specific embodiment
In order to which technical problems, technical solutions and advantages to be solved are more clearly understood, tie below
Embodiment is closed, the present invention will be described in detail.It should be noted that specific embodiment described herein is only to explain
The present invention is not intended to limit the present invention.
The cross-platform method for calling Web Service service, comprising the following steps:
(1) dynamic analysis Web Service URL obtains proxy class example;
(2) dynamic sequence image parameter;
(3) dynamic sequence array parameter;
(4) dynamic analysis and Web Service method of servicing is executed.
The step (1) specifically includes the following steps:
(a) it is automatically parsed according to Web Service URL and generates WSDL memory file;
(b) it is automatically generated according to WSDL memory file and default namespace and acts on behalf of category code;
(c) according to act on behalf of category code automatically compile generate proxy class procedure set;
(d) proxy class example is automatically created according to proxy class procedure set.
The step (2) specifically includes the following steps:
(a) specified parameter type instance objects are created;
(b) instance objects attribute information is parsed and according to the corresponding relationship assignment of attribute-name and DataRow column name;
(c) assignment of boolean properties in instance objects is handled to solve data cross-platform transmission problem;
(d) instance objects are returned.
The step (3) specifically includes the following steps:
(a) ArrayList example is created;
(b) traversal DataTable according to DataRow and specified parameter type obtain instance objects and be filled with to
ArrayList example;
(c) instance objects array is returned.
The step (4) specifically includes the following steps:
(a) according to specified Web Service method name acquisition methods information;
(b) according to DataTable or DataRow and method parameter type acquisition methods parameter object;
(c) Web Service method is called in reflection.
The cross-platform method for calling Web Service service, when needing cross-platform calling Web Service service,
Web Service reference, creation Web Service service object, the tissue side Service Web are added without developer
A series of codings configuration operations such as method parameter object and calling Web Service method of servicing, it is only necessary to which Web Service is provided
URL and service method name and method parameter type name information, can cross-platform calling Web Service service.
Claims (5)
1. a kind of cross-platform method for calling Web Service service, which comprises the following steps:
Dynamic analysis Web Service URL obtains proxy class example;
Dynamic sequence image parameter;
Dynamic sequence array parameter;
Dynamic analysis simultaneously executes Web Service method of servicing.
2. the cross-platform method for calling Web Service service according to claim 1, which is characterized in that the step
(1) specifically includes the following steps:
It is automatically parsed according to Web Service URL and generates WSDL memory file;
It is automatically generated according to WSDL memory file and default namespace and acts on behalf of category code;
Generation proxy class procedure set is compiled automatically according to category code is acted on behalf of;
Proxy class example is automatically created according to proxy class procedure set.
3. the cross-platform method for calling Web Service service according to claim 1, which is characterized in that the step
(2) specifically includes the following steps:
Create specified parameter type instance objects;
Parse instance objects attribute information and according to the corresponding relationship assignment of attribute-name and DataRow column name;
The assignment of boolean properties in instance objects is handled to solve data cross-platform transmission problem;
Return to instance objects.
4. the cross-platform method for calling Web Service service according to claim 1, which is characterized in that the step
(3) specifically includes the following steps:
Create ArrayList example;
Traversal DataTable obtains instance objects according to DataRow and specified parameter type and is filled with to ArrayList reality
Example;
Return to instance objects array.
5. the cross-platform method for calling Web Service service according to claim 1, which is characterized in that the step
(4) specifically includes the following steps:
According to specified Web Service method name acquisition methods information;
According to DataTable or DataRow and method parameter type acquisition methods parameter object;
Web Service method is called in reflection.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810860279.9A CN109086148A (en) | 2018-08-01 | 2018-08-01 | A kind of cross-platform method for calling Web Service service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810860279.9A CN109086148A (en) | 2018-08-01 | 2018-08-01 | A kind of cross-platform method for calling Web Service service |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109086148A true CN109086148A (en) | 2018-12-25 |
Family
ID=64831095
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810860279.9A Pending CN109086148A (en) | 2018-08-01 | 2018-08-01 | A kind of cross-platform method for calling Web Service service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109086148A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471650A (en) * | 2019-07-11 | 2019-11-19 | 新华三大数据技术有限公司 | A kind of Web Service dissemination method, device and server |
CN117009110A (en) * | 2023-08-30 | 2023-11-07 | 中国人民解放军陆军工程大学 | Interface dynamic calling method based on description information |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101263481A (en) * | 2005-09-12 | 2008-09-10 | 微软公司 | Server-side service framework |
CN101534324A (en) * | 2009-04-14 | 2009-09-16 | 河北全通通信有限公司 | Dynamic invocation method of DotNet platform-based pluggable Web service |
CN101853156A (en) * | 2010-05-12 | 2010-10-06 | 上海普元信息技术股份有限公司 | Method for realizing web service call in component-based software system |
CN102694865A (en) * | 2012-05-31 | 2012-09-26 | 深圳市远行科技有限公司 | Web Service server and mass data transmission method thereof |
WO2015147354A1 (en) * | 2014-03-27 | 2015-10-01 | 엘지전자 주식회사 | Spdy-based web acceleration method and spdy proxy therefor |
CN105159974A (en) * | 2015-08-27 | 2015-12-16 | 浪潮软件股份有限公司 | Method for automatically generating cross-data-source web service |
-
2018
- 2018-08-01 CN CN201810860279.9A patent/CN109086148A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101263481A (en) * | 2005-09-12 | 2008-09-10 | 微软公司 | Server-side service framework |
CN101534324A (en) * | 2009-04-14 | 2009-09-16 | 河北全通通信有限公司 | Dynamic invocation method of DotNet platform-based pluggable Web service |
CN101853156A (en) * | 2010-05-12 | 2010-10-06 | 上海普元信息技术股份有限公司 | Method for realizing web service call in component-based software system |
CN102694865A (en) * | 2012-05-31 | 2012-09-26 | 深圳市远行科技有限公司 | Web Service server and mass data transmission method thereof |
WO2015147354A1 (en) * | 2014-03-27 | 2015-10-01 | 엘지전자 주식회사 | Spdy-based web acceleration method and spdy proxy therefor |
CN105159974A (en) * | 2015-08-27 | 2015-12-16 | 浪潮软件股份有限公司 | Method for automatically generating cross-data-source web service |
Non-Patent Citations (3)
Title |
---|
(美)JEFFREY P.MCMANUS,(美)CHRIS KINSMAN著;常晓波,朱剑平译: "《C#开发人员指南 ASP.NET、XML、Web服务与ADO.NET》", 30 April 2003, 中国电力出版社 * |
KELLYZHENG: "《动态生成WebService代理类》", 《HTTPS://WWW.CNBLOGS.COM/KELLY%2DZHENG/P/5205955.HTML1》 * |
高寿柏主编: "《.NET企业级应用案例教程》", 31 May 2008, 山东友谊出版社 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471650A (en) * | 2019-07-11 | 2019-11-19 | 新华三大数据技术有限公司 | A kind of Web Service dissemination method, device and server |
CN110471650B (en) * | 2019-07-11 | 2022-08-09 | 新华三大数据技术有限公司 | Web Service publishing method, device and server |
CN117009110A (en) * | 2023-08-30 | 2023-11-07 | 中国人民解放军陆军工程大学 | Interface dynamic calling method based on description information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101127655B (en) | Method and system for integrating existing www systems | |
KR100583517B1 (en) | System and method of mapping between software objects and structured language element based documents | |
CN110806863A (en) | Interface document generation method and device, electronic equipment and storage medium | |
US20040168124A1 (en) | System and method of mapping between software objects & structured language element-based documents | |
US9182953B2 (en) | Hybrid dynamic code compiling device, method, and service system thereof | |
CN106293664A (en) | Code generating method and device | |
CN100525302C (en) | Script generating device based on assembly multiplexing, and method therefor | |
CN111078555B (en) | Test file generation method, system, server and storage medium | |
CN113031932B (en) | Project development method, apparatus, electronic device and storage medium | |
CN1983958A (en) | Method for generating two set of network administration systems | |
CN108241902A (en) | A kind of Web projects and performance optimization method | |
CN110990011A (en) | Data request method of automation interface | |
CN109086148A (en) | A kind of cross-platform method for calling Web Service service | |
CN106126564A (en) | A kind of method rendered based on dynamic template language | |
CN104991810B (en) | Method and processing system in automatic addition APK to Android system | |
CN110045950A (en) | Static page based on nodejs develops scaffold method | |
CN111158665B (en) | Code generation method and device, electronic equipment and storage medium | |
CN111190587A (en) | Method and system for automatically generating engineering front-end code based on JDBC | |
CN106293862A (en) | A kind of analysis method and device of expandable mark language XML data | |
CN115061678A (en) | Code compiling method and client based on browser proxy service | |
Kim et al. | Migrating Legacy Software Systems to Corba based Distributed Environments through an Automatic Wrapper Generation Technique [versión electrónica] | |
CN112287012B (en) | Method for realizing http interface calling by Spark SQL mode | |
CN117519691B (en) | Application processing method, device, computer equipment and storage medium | |
KR20080065814A (en) | Device for automatic creating an embedded software for realtime operating system, and method for the same | |
KR960013965B1 (en) | Auto-generation of menu of mobile station management 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181225 |