Generic Client Library for Web API Integration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large integrations with multiple web APIs require extensive and complex client libraries, increasing the size and complexity of client applications and complicating development and maintenance, especially when web APIs are frequently updated.
Innovation Solution
A generic client library is deployed on a client device, which defines a proxy class with a generic operation method that communicates with web APIs, converting input and output payloads and responses, allowing a single library to interact with multiple web APIs, reducing the need for multiple client libraries and simplifying integration.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If traditional client libraries are provided for each web API, then the ability to access web services is enabled, but the size and complexity of the client application increases
Solution Approach 1:
The patent implements a universal client library that can access multiple different web APIs through a single unified interface. The library uses a proxy class with a generic operation method that accepts operation names as strings, allowing the same library code to work with different web services without requiring separate client libraries for each API.
Solution Approach 2:
The patent introduces an intermediary layer in the form of a proxy class that sits between the client application and web APIs. This proxy class handles the complexity of API communication by converting high-level operation calls into appropriate web service requests, shielding the client application from API-specific complexity.
2Adaptability or versatility
If multiple client libraries are provided for different web APIs, then the capability to interact with various web services is improved, but the development and maintenance difficulty increases
Solution Approach 1:
The patent creates a single universal client library that can interact with multiple web APIs through a consistent interface. Developers call operations using the same pattern regardless of which web service is being accessed, eliminating the need to learn and maintain multiple different client library APIs.
Solution Approach 2:
The patent segments the client library into a reusable proxy class with a generic operation method. This segmentation allows the core functionality to be reused across different web services while keeping the implementation details encapsulated within the proxy class, simplifying both development and maintenance.
3Reliability
If client libraries are manually written for each web API, then the customization and accuracy can be optimized, but the time required for development increases
Solution Approach 1:
The patent uses code generation to create the proxy class and its operation methods by copying templates rather than manually writing each one. The generator creates the necessary client code automatically based on web service descriptions, significantly reducing development time while maintaining accuracy through systematic code generation.
Solution Approach 2:
The patent employs parameterized templates where the same code structure can be instantiated with different operation names and parameters. This allows the system to adapt to different web APIs by changing parameters rather than rewriting code, maintaining customization while reducing development effort.
Data Source
Figure 1~2b
Figure 2c
Figure 3~4
AI summary
A method of accessing a web service of a web application via a web API. The method comprises: deploying, to a client device, client application code comprising a generic client library, said client application code comprising code for accessing the web service of the web application via the web API and running the client application code on the client device to: communicate a web service operation call to the web API, running on a server device, via an interface, and receive a web service operation response from the web API via the interface. The generic client library comprises code defining a first proxy class within which is defined a generic operation method, said operation method configured such that responsive to receipt of an operation name parameter corresponding to a web service operation performed by the web application from a function caller of the client application code, the operation method returns an operation function object, said operation function object providing the interface between the client application code and the web API.