Supercharge Your Innovation With Domain-Expert AI Agents!

Web service interface calling parameter transformation method and system

A technology of parameter conversion and interface calling, applied in the direction of program control devices, etc., can solve problems such as repeated codes, and achieve the effect of improving the reuse rate

Active Publication Date: 2015-12-16
北京思特奇信息技术股份有限公司
View PDF4 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] When providing webservice interface services, if the WebService interface protocol is defined as the currently popular JSON string format, if no design is made, we need to manually convert JSON string parameters into objects at the interface implementation, but when the number of services When it reaches a large order of magnitude, such repetitive code will be amazing

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Web service interface calling parameter transformation method and system
  • Web service interface calling parameter transformation method and system
  • Web service interface calling parameter transformation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0019] Embodiment 1. A method for converting parameters of a webservice interface call. Combine below figure 1 and figure 2 The method provided in this embodiment will be described in detail.

[0020] see figure 1 , S1. Define a CXF interceptor, and add the defined CXF interceptor to the CXF interceptor chain.

[0021] Specifically, CXF inherits the essence of the two open source projects Celtix and XFire, provides comprehensive support for JAX-WS, and provides a variety of Binding, DataBinding, Transport and various Format support, and can be based on actual project needs , Use code first (CodeFirst) or WSDL first (WSDLFirst) to easily implement the release and use of WebServices. Therefore, in this embodiment, a CXF interceptor is customized during the process of calling the webservice interface by the external system, and the defined CXF interceptor is added to the CXF interceptor chain.

[0022] S2. Use the added CXF interceptor to intercept and obtain the string par...

Embodiment 2

[0035] Embodiment 2, a webservice interface call parameter conversion system. Combine below image 3 The system provided in this embodiment will be described in detail.

[0036] see image 3 , the system provided by this embodiment includes an interceptor definition module 10, a parameter interception module 20, a Map data structure 30, and a parameter conversion module 40, wherein the Map data structure 30 includes a correspondence storage module 301, and the parameter conversion module 40 includes a first acquisition Module 401 and a second acquiring module 402 .

[0037] The interceptor definition module 10 is mainly used to define a CXF interceptor, and add the defined CXF interceptor to the CXF interceptor chain.

[0038] The parameter interception module 20 is mainly used to use the CXF interceptor defined by the interceptor definition module 10 to intercept and obtain the string parameter passed when the external system calls the webservice interface.

[0039] Speci...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a web service interface calling parameter transformation method and system. The method comprises the following steps of: defining a CXF interceptor and adding the defined CXF interceptor into a CXF interceptor chain; intercepting and acquiring character string parameters transmitted when a web service interface is called by an external system by use of the defined CXF interceptor; and the CXF interceptor, according to a pre-configured conversion relationship between the character string parameters and object parameters, converting the character string parameters into the object parameters to realize calling of the web service interface. According to the method provided by the invention, one CXF interceptor is arranged at the called web service interface, so that the character string parameters transmitted by the external system can be uniformly converted into the object parameters for realizing calling, and the purpose of code reuse is achieved.

Description

technical field [0001] The invention relates to the technical field of interface calling, in particular to a method and system for converting parameters of a web service interface calling. Background technique [0002] JSON (JavaScript Object Notation) string is a lightweight data exchange format, using a completely language-independent text format, easy to read and write for humans, and easy for machines to parse and generate. [0003] When providing webservice interface services, if the WebService interface protocol is defined as the currently popular JSON string format, if no design is made, we need to manually convert JSON string parameters into objects at the interface implementation, but when the number of services When it reaches a large order of magnitude, such repetitive code can be quite alarming. Contents of the invention [0004] The technical problem to be solved by the present invention is to provide a webservice interface call parameter conversion method an...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 王幸
Owner 北京思特奇信息技术股份有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More