METHOD TO AUTO GENERATE JAX-RS REST SERVICE IMPLEMENTATION CLASSES FROM EXISTING INTERFACES
First Claim
1. A method for auto generating a Java interface (JAX-RS) for representational state transfer (REST) web services by a web server processing system, comprising:
- receiving a reference interface for a REST service object;
receiving a set of determiners defining a plurality of configuration values for a REST service object to generate a service binding;
determining a plurality of resource methods for each resource class in the reference interface, and for each resource method, determining a parameter, a return type, and an exception;
sequentially processing each resource method of each class and writing the name of each resource into a string buffer;
determining the operation type for each resource method for each resource class based on at least one predefined match and writing an operation name into the string buffer for each resource method;
determining a return type for each resource method for each resource class; and
converting each parameter in the resource method to a JAX-RS compatible parameter.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, computer program product, and system for auto generating a Java application programming interface (JAX-RS) for representational state transfer (REST) web services. A reference interface for a REST service object is received by a server computer system. A set of determiners defines a plurality of configuration values for a REST service object to generate a service binding. A plurality of resource methods for each resource class in the reference interface is determined, and for each resource method, a parameter, a return type, and an exception are determined. Each resource method of each class is sequentially processed and the name of each resource is written into a string buffer. The operation type for each resource method for each resource class is determined based on at least one predefined match and an operation name is written into the string buffer for each resource method. A return type is determined for each resource method for each resource class. Each parameter in the resource method is converted to a JAX-RS compatible parameter.
31 Citations
25 Claims
-
1. A method for auto generating a Java interface (JAX-RS) for representational state transfer (REST) web services by a web server processing system, comprising:
-
receiving a reference interface for a REST service object; receiving a set of determiners defining a plurality of configuration values for a REST service object to generate a service binding; determining a plurality of resource methods for each resource class in the reference interface, and for each resource method, determining a parameter, a return type, and an exception; sequentially processing each resource method of each class and writing the name of each resource into a string buffer; determining the operation type for each resource method for each resource class based on at least one predefined match and writing an operation name into the string buffer for each resource method; determining a return type for each resource method for each resource class; and converting each parameter in the resource method to a JAX-RS compatible parameter. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A computer program product for auto generating a Java interface (JAX-RS) for representational state transfer (REST) web services when executed on a computer processor, the computer program product comprising a tangible computer readable medium having embedded thereon:
-
program instructions that cause the processor to receive a reference interface for a REST service object; program instructions that cause the processor to receive a set of determiners defining a plurality of configuration values for a REST service object to generate a service binding; program instructions that cause the processor to determine a plurality of resource methods for each resource class in the reference interface, and for each resource method, determine a parameter, a return type, and an exception; program instructions that cause the processor to sequentially process each resource method of each resource class and to write the name of each resource into a string buffer; program instructions that cause the processor to determine the operation type for each resource method for each resource class based on at least one predefined match and to write an operation name into the string buffer for each resource method; program instructions that cause the processor to determine a return type for each resource method for each class; and program instructions that cause the processor to convert each parameter in the resource method to a JAX-RS compatible parameter. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
-
-
24. A system for auto generating a Java interface (JAX-RS) for representational state transfer (REST) web services, comprising:
-
a web server for exposing a web service interface for implementation of JAX-RS for REST web services; a processor for executing a plurality of modules, including; a module for receiving a reference interface for a REST service object; a module for receiving a set of determiners defining a plurality of configuration values for a REST service object to generate a service binding; a module for determining a plurality of resource methods for each resource class in the reference interface, and for each resource method, determining a parameter, a return type, and an exception; a module for sequentially processing each resource method of each class and writing the name of each resource into a string buffer; a module for determining the operation type for each resource method for each resource class based on at least one predefined match and writing an operation name into the string buffer for each resource method; a module for determining a return type for each resource method for each resource class; and a module for converting each parameter in the resource method to a JAX-RS compatible parameter. - View Dependent Claims (25)
-
Specification