WO2020026778A1 - Apiアダプタ作成装置、apiアダプタ作成方法およびapiアダプタ作成プログラム - Google Patents

Apiアダプタ作成装置、apiアダプタ作成方法およびapiアダプタ作成プログラム Download PDF

Info

Publication number
WO2020026778A1
WO2020026778A1 PCT/JP2019/027797 JP2019027797W WO2020026778A1 WO 2020026778 A1 WO2020026778 A1 WO 2020026778A1 JP 2019027797 W JP2019027797 W JP 2019027797W WO 2020026778 A1 WO2020026778 A1 WO 2020026778A1
Authority
WO
WIPO (PCT)
Prior art keywords
api
parameter
setting
adapter
execution
Prior art date
Application number
PCT/JP2019/027797
Other languages
English (en)
French (fr)
Inventor
直樹 武
謙輔 高橋
友基 池谷
伸夫 小内
未稚 大谷
加藤 浩
Original Assignee
日本電信電話株式会社
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 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US17/264,589 priority Critical patent/US11487595B2/en
Publication of WO2020026778A1 publication Critical patent/WO2020026778A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/311Functional or applicative languages; Rewrite languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications

Definitions

  • the present invention relates to an API adapter creation device, an API adapter creation method, and an API adapter creation program for efficiently creating an API adapter provided in a multiple service cooperation execution device.
  • B2B2X Business @ to
  • Digital services wholelesale services
  • the company provides the service as a REST API (REpresentational State Transfer Application Program Interface) over HTTP (HyperText Transfer Protocol) (hereinafter also simply referred to as API). Further, the business operator stipulates and publishes API specifications such as API names, access destination URLs (Uniform Resource Locators), HTTP methods and parameters.
  • REST API REpresentational State Transfer Application Program Interface
  • HTTP HyperText Transfer Protocol
  • API specifications such as API names, access destination URLs (Uniform Resource Locators), HTTP methods and parameters.
  • Non-Patent Literatures 1 and 2 disclose techniques as an architecture of a multiple service cooperation execution device that can easily cope with a change in the specifications of a new wholesale service and an existing service.
  • Non-Patent Documents 1 and 2 propose API adapters that can easily cope with a new wholesale service or a specification change by absorbing a difference in specifications of different wholesale services.
  • Non-Patent Literature 1 and Non-Patent Literature 2 describe the use of a commercial library, the creation of a common library, and the automatic generation of source code based on the specifications of a wholesale service API for some components (modules) of an API adapter. It describes that the development of an API adapter can be facilitated. However, API adapters still have modules that need to be manually designed and implemented, and further development has been desired.
  • the present invention has been made in view of such a background, and the present invention provides an API adapter creating apparatus, an API adapter creating method, and an API adapter capable of efficiently creating an API adapter for a wholesale service provided in a multiple service cooperation execution apparatus. And an API adapter creation program.
  • the invention according to claim 1 provides an API (Application Program Interface) adapter of the wholesale service, which is provided in a multiple service cooperation execution device that constructs a cooperation service combining a plurality of wholesale services.
  • API Application Program Interface
  • An API adapter creation device for creating an adapterized API to be executed, comprising: an API execution order setting unit that receives a setting of an execution order of a wholesale service API indicating an API of the wholesale service called by an internal process of the adapterized API; An API request parameter acquisition source setting unit for receiving the setting of the request parameter of the adapterized API from which the request parameter of the service API is acquired, and a response parameter of the adapterized API to which the response parameter of the wholesale service API is reflected Reflect API response parameters to accept settings A destination setting unit, a source code generation unit that generates a source code of the adapterized API based on the setting of the execution order, the setting of the acquisition source, and the setting of the reflection destination. API adapter creation device.
  • the invention according to claim 5 is an API adapter creating apparatus for creating an adapterized API provided by the API adapter of the wholesale service, which is provided in a multiple service cooperation execution apparatus that constructs a linked service combining a plurality of wholesale services.
  • Receiving the setting of the execution order of the wholesale service API indicating the wholesale service API called by the internal processing of the adapterized API, and obtaining the request parameter of the wholesale service API Accepting the setting of the request parameter of the adapterized API, accepting the setting of the response parameter of the adapterized API to which the response parameter of the wholesale service API is to be reflected, setting the execution order, and acquiring the acquisition source Based on the settings of Generating a source code of the serial adapter of API, it was API adapter creation method characterized by the execution.
  • the API adapter creating apparatus can call the wholesale service API in accordance with the execution order defined by the API adapter developer and acquire the wholesale service API request parameter from the adapterized API request parameter. It is possible to generate a source code including reflection of the response parameter of the adapter API from the response parameter of the wholesale service. Therefore, the developer does not need to write the source code, and can concentrate on the examination of the logic. As a result, the development period of the API adapter is shortened, and new wholesale services and specification changes can be handled in a short time.
  • the invention according to claim 2 further comprising: an API execution condition setting unit that receives setting of an execution condition of execution of the wholesale service API, wherein the source code generation unit includes contents of the setting of the execution condition.
  • the API adapter creating device according to claim 1, wherein a source code of the adapterized API is generated.
  • the API adapter device can generate a source code including a conditional wholesale service API call.
  • the invention according to claim 3 further includes an API repetition condition setting unit that receives a setting of a repetition condition of repetition execution of the wholesale service API, wherein the source code generation unit includes the content of the setting of the repetition condition.
  • the API adapter device can generate a source code including a repeated call to the wholesale service API.
  • an API request / response parameter design support unit for setting a response parameter of the adapterized API having the same name as the response parameter as a reflection destination, and the source code generation unit includes: The API adapter according to any one of claims 1 to 3, wherein a source code of the adapterized API is generated including the contents of the setting of the acquisition source and the reflection destination set by the design support unit. The device.
  • the developer can set the request parameters and the response parameters with less operations than when using the API adapter device according to claim 1, and the API adapter development becomes more efficient.
  • an API adapter creating program for causing a computer to function as the API adapter creating apparatus according to any one of the first to fourth aspects.
  • the API adapter device can be realized using a general computer.
  • an API adapter creation device an API adapter creation method, and an API adapter creation program capable of efficiently creating an API adapter for a wholesale service provided in a multiple service cooperation execution device.
  • FIG. 1 is a diagram illustrating a configuration of a network system including a multiple service cooperation execution device according to an embodiment.
  • FIG. 3 is a diagram illustrating a configuration of an API adapter unit according to the embodiment.
  • 5 is a flowchart illustrating a procedure for developing an API call logic unit according to the embodiment. It is a figure showing the whole API adapter creation device composition concerning this embodiment. It is a figure showing the data composition of wholesale service API specification database concerning this embodiment.
  • FIG. 3 is a diagram illustrating a data configuration of an API execution order database according to the embodiment.
  • FIG. 3 is a diagram illustrating a data configuration of an API parameter database according to the embodiment. It is a figure showing the execution order setting screen which the API adapter creation device concerning this embodiment displays.
  • FIG. 3 is a diagram for explaining records included in an API parameter database according to the embodiment. It is a figure which shows the parameter setting screen of the request parameter which the API adapter preparation apparatus which concerns on this embodiment displays.
  • FIG. 3 is a diagram for explaining records included in an API parameter database according to the embodiment. It is a figure showing the execution order setting screen which the API adapter creation device concerning this embodiment displays. It is a figure showing the execution condition setting screen which the API adapter creation device concerning this embodiment displays.
  • FIG. 4 is a diagram for explaining records of an API parameter database according to the embodiment.
  • FIG. 9 is a diagram showing a repetition condition setting screen displayed by the API adapter creation device according to the embodiment.
  • 5 is a flowchart illustrating a source code generation process executed by a source code generation unit according to the embodiment.
  • 9 is a flowchart illustrating a main process output process executed by a source code generation unit according to the embodiment. It is a source code generated by a source code generation unit according to the embodiment.
  • an API adapter creation device in an embodiment (embodiment) for implementing the present invention (described later) 4 (see FIG. 4).
  • FIG. 1 is a diagram illustrating a configuration of a network system including a multiple service cooperation execution device 900 according to the present embodiment.
  • the multiple service cooperation execution device 900 includes a cooperation execution device main body 910 and API adapters 920A to 920C.
  • the service provider 980 issues the cooperation order 950 to the multiple service cooperation execution device 900 via the multiple service cooperation API 970, and receives the cooperation service 965.
  • the cooperation order 950 is a message requesting a cooperation service 965 in which the network A service 951A, the cloud B service 951B, and the application C service (described as an application C service in FIG. 1) 951C cooperate.
  • the coordination execution apparatus main body unit 910 receives the service included in the received coordination order 950 from the wholesale service provider, cooperates with the service, and provides the service provider 980 as the cooperative service 965.
  • the coordination execution apparatus main body unit 910 refers to a catalog (setting file) (not shown) and generates a single order 955A corresponding to the network A service 951A included in the coordination order 950 and a single order 955B corresponding to the cloud B service 951B. , And a single order 955C corresponding to the application C service 951C.
  • the coordination execution device main unit 910 requests a wholesale service via the coordination execution device main unit API 973, using the unit orders 955A to 955C as parameters.
  • the coordination execution device main unit 910 receives the services 962A to 962C, generates a cooperative service 965 by cooperating with the services 962A to 962C, and provides the cooperative service 965 to the service provider 980.
  • the API adapter unit 920A receives the unit order 955A, transmits the service A request 956A to the wholesale service provider A985A via the wholesale service API 975A, receives the service A 961A, and provides the service 962A to the coordination execution device main unit 910. I do.
  • the API adapter unit 920B receives the unit order 955B, transmits the service B request 956B to the wholesale service provider B985B via the wholesale service API 975B, receives the service B 961B, and provides the service 962B to the coordination execution device main unit 910. I do.
  • the API adapter unit 920C receives the unit order 955C, transmits the service C request 956C to the wholesale service provider C985C via the wholesale service API 975C, receives the service C961C, and provides the service 962C to the coordination execution device main unit 910. I do.
  • Wholesale service APIs 975A to 975C are APIs independently provided by the wholesale service provider A985A, the wholesale service provider B985B, and the wholesale service provider C985C.
  • the API adapter units 920A to 920C absorb differences between the wholesale service APIs 975A to 975C and provide a common coordination execution device main unit API 973 to the coordination execution device main unit 910.
  • the multiple service cooperation execution apparatus 900 can provide a cooperation service including a new wholesale service. For this reason, the time and cost corresponding to the new wholesale service depend on the time and cost of development of the API adapter units 920A to 920C, and easiness of development is required.
  • FIG. 2 is a diagram illustrating a configuration of the API adapter unit 920 according to the present embodiment.
  • the API adapter unit 920 includes an order receiving unit 921, an API calling logic unit 922, and a wholesale service API executing unit 923.
  • the order receiving unit 921 receives a single order 955 from the coordination execution apparatus main body 910, and acquires the contents of the order. Further, the order receiving unit 921 performs a response process to the coordination execution device main unit 910.
  • the API calling logic unit 922 calls (executes) the individual service provided by the wholesale service provider 985 via the API in order to acquire the service requested by the single order 955. At this time, the API calling logic unit 922 generates request parameters of the individual service according to the execution order of the individual services provided by the wholesale service provider 985, calls the service via the API, and processes the response parameters. In response to the call of the API call logic unit 922, the wholesale service API execution unit 923 assembles an HTTP request and transmits it to the wholesale service company 985, receives a response, and outputs the response to the API call logic unit 922.
  • the order receiving unit 921 can be efficiently developed by using a common library.
  • the wholesale service API execution unit 923 is capable of efficient development by using an automatic source code generation tool based on API specifications of individual services (see Non-Patent Document 2).
  • the API call logic unit 922 requires manual design and implementation, which requires time and cost for development.
  • the present invention generates the source code of the API call logic unit 922 by manually setting only the minimum items in the design of the API call logic unit 922, and develops an efficient API adapter unit 920. Is possible.
  • requesting (calling) the wholesale service via the wholesale service API is also referred to as calling (executing) the wholesale service API while identifying the wholesale service and the wholesale service API.
  • FIG. 3 is a flowchart for explaining a development procedure of the API call logic unit 922 according to the present embodiment.
  • FIGS. 3 and 2 a description will be given of a procedure of developing the API call logic unit 922 performed by a developer using an API adapter creation device (see FIG. 4 described later).
  • step S101 the developer understands the API of the wholesale service.
  • the developer consults the specifications of the API provided by the wholesale service provider 985 or uses an API test tool in the market to check the specifications (verify the operation of the API) while checking the specifications. Understand the service API.
  • the developer is an API (an API provided as the cooperative execution device main unit API 973, an API supported by the API adapter unit 920, an API to be developed, and also referred to as an adapterized API).
  • the developer in charge determines the adapterized API, and executes the wholesale service individual service (wholesale service API) in the execution order (see FIG. 8 described later) and the execution condition (required in order to make the adapterized API function).
  • the following conditions see FIGS. 14 and 15
  • the repetition conditions see FIGS. 17 and 18
  • the adapterized API and the internal processing are identified, and the adapterized API calls (executes) a wholesale service (wholesale service API).
  • step S103 the developer specifies parameters. More specifically, the developer develops a request parameter (see FIG. 9 described later) included in the single order 955 from which the request parameter of the individual service is acquired, and a response parameter (refer to FIG. 9) of the service 962 to which the response parameter of the individual service is reflected. 10 to be described later).
  • a request parameter see FIG. 9 described later
  • a response parameter (refer to FIG. 9) of the service 962 to which the response parameter of the individual service is reflected. 10 to be described later).
  • step S104 the developer instructs the API adapter creation device to generate the source code of the API call logic unit 922 (see FIG. 21 described later).
  • step S105 the developer instructs the API adapter creation device to generate an execution file of the API adapter unit 920 including the order receiving unit 921 and the wholesale service API execution unit 923.
  • FIG. 4 is a diagram illustrating an overall configuration of the API adapter creation device 100 according to the present embodiment.
  • the configuration of the API adapter creating apparatus 100 used by the developer in developing the API adapter described in steps S102 to S105 of FIG. 3 will be described with reference to FIG.
  • the API adapter creation device 100 includes a control unit 110, a storage unit 120, and an input / output unit 130.
  • the input / output unit 130 includes an input device (not shown) such as a keyboard and a mouse, and an output device (not shown) such as a display.
  • the input / output unit 130 receives and displays logic and parameters of an adapter API defined by a developer.
  • the control unit 110 includes a CPU (Central Processing Unit), a wholesale service API specification reference unit 111, an API execution order setting unit 112, an API execution condition setting unit 113, an API repetition execution setting unit 114, an API request parameter acquisition source setting. It comprises a unit 115, an API response parameter reflection destination setting unit 116, an API request response parameter design support unit 117, a source code generation unit 118, and an adapter generation unit 119.
  • CPU Central Processing Unit
  • the control unit 110 includes a CPU (Central Processing Unit), a wholesale service API specification reference unit 111, an API execution order setting unit 112, an API execution condition setting unit 113, an API repetition execution setting unit 114, an API request parameter acquisition source setting. It comprises a unit 115, an API response parameter reflection destination setting unit 116, an API request response parameter design support unit 117, a source code generation unit 118, and an adapter generation unit 119.
  • the wholesale service API specification reference unit 111 reads the API specification described in the standard format of the wholesale service, and writes a wholesale service API specification database 210 (described as a wholesale service API specification DB (Database) in FIG. (See FIG. 5 described later). In addition, the wholesale service API specification reference unit 111 displays an API name and parameters included in the read wholesale service API specification on a display.
  • a wholesale service API specification database 210 described as a wholesale service API specification DB (Database) in FIG. (See FIG. 5 described later.
  • the wholesale service API specification reference unit 111 displays an API name and parameters included in the read wholesale service API specification on a display.
  • FIG. 5 is a diagram illustrating a data configuration of the wholesale service API specification database 210 according to the present embodiment.
  • the wholesale service API specification database 210 includes API specifications 229 of individual services provided by the wholesale service provider 985 (see FIG. 2).
  • Each API specification 229 includes a description of the API name 211, method 212, endpoint 213, request parameter 214, response parameter 219, and expected response 224.
  • the API name 211 is the name of the API.
  • the method 212 is an HTTP method for calling an API, and includes GET, POST, and the like.
  • the endpoint 213 is an address for calling the API.
  • the request parameter 214 is, for example, tabular data.
  • One row (record) represents one request parameter, and includes an object 215, a parameter 216, and a column (attribute) of a type 217.
  • the object 215 is the name of the object including the parameter indicated by the record.
  • Parameter 216 is the name of the parameter.
  • the type 217 is the type of the parameter.
  • Record 218 is included in the “AuthRequest” object and represents an “email” parameter of type “string”.
  • the response parameter 219 is, for example, tabular data, and one record represents one response parameter and includes attributes of the object 220, the parameter 221 and the type 222.
  • the meanings of the object 220, parameter 221 and type 222 are the same as those of the object 215, parameter 216 and type 217, respectively.
  • the record 223 is included in the “AuthResponse” object, and represents the “apiToken” parameter whose type is “string”.
  • the expected response 224 indicates an HTTP status code at the time of a normal response after calling the API.
  • the API execution order setting unit 112 sets the order of the wholesale service API called by the adapterized API. Specifically, the API execution order setting unit 112 reflects the call order (execution order) (see FIG. 8 described later) of the wholesale service API specified by the developer in the API execution order database 230 (see FIG. 6) described later. I do.
  • the API execution condition setting unit 113 sets the execution condition of the wholesale service API called by the adapterized API. More specifically, the API execution condition setting unit 113 describes the wholesale service API (see FIG. 14 described later) and its execution condition (calling condition, see FIG. 15 described later) to be called with a condition defined by the developer. This is reflected in the execution order database 230.
  • the API repetition execution setting unit 114 sets a wholesale service API that is repeatedly called by the adapterized API. More specifically, the API repetition execution setting unit 114 stores the wholesale service API (see FIG. 17 described later) and the repetition conditions (see FIG. 18 described later) defined by the developer in charge, in the API execution order database 230 described later. To reflect.
  • FIG. 6 is a diagram illustrating a data configuration of the API execution order database 230 according to the present embodiment.
  • the API execution order database 230 is, for example, tabular data, and one row (record) indicates processing in one adapterized API.
  • Each record includes an API 231, a type 232, an execution order 233, a process type 234, a process 235, and a column (attribute) of additional information 236.
  • $ API 231 is the name of the adapterized API.
  • the type 232 is the type of the adapterized API, and includes a new type indicated by “A”, a change indicated by “M”, and a deletion indicated by “D”.
  • One adapterized API is specified by a combination of the API 231 and the type 232.
  • the execution order 233 indicates the execution order in one adapterized API.
  • the process type 234 indicates the type of process indicated by the record, and includes "API execution” indicating a call to the wholesale service API and "control” indicating conditional execution or repeated execution.
  • Step 235 indicates the contents of the processing. If the process type 234 is “API execution”, the process 235 is the API name of the wholesale service to be called (see the API name 211 in FIG. 5). When the process type 234 is “control”, the process 235 includes “if” indicating the start and execution condition of the conditional execution, “end @ if” indicating the end of the conditional execution, and “start @ if” indicating the start of the repeated execution and the repeat condition. "End” or "end @ for” indicating the end of the repetitive execution.
  • the additional information 236 is an execution condition or a repetition condition.
  • the records 241 and 242 indicate that the adapter API of “XXX” whose type 232 is “A” (new) first calls (executes) the API “postAuth” of the wholesale service, and then calls “postNetwork”. Is shown.
  • Records 243 to 248 indicate that the adapter API of “YYY” whose type 232 is “A” first calls “postAuth” (see record 243), and then performs repetitive processing (see record 244). I have.
  • the condition of the repetition processing is “productOrder.characteristic.network” indicated in the additional information 236 of the record 244.
  • “productOrder.characteristic.network” is a variable indicating an array, and the process is repeated for each element of the array.
  • the contents of the repeated processing are the processing up to “end @ for” (see the record 248) corresponding to the “for” which is the processing 235 of the record 244, and the processing indicated by the records 245 to 247 is repeated.
  • the content of the executed processing is processing up to “end @ if” (see record 247) corresponding to “if” which is processing 235 of record 245, and processing for calling wholesale service API “postNetwork” indicated by record 246. It is.
  • the API request parameter acquisition source setting unit 115 sets the request parameter of the adapterized API from which the request parameter of the called wholesale service API is acquired. More specifically, the API request parameter acquisition source setting unit 115 stores, in the API parameter database 250 to be described later, the request parameters (see FIG. 9) of the adapterized API from which the request parameters of the wholesale service API are acquired by the developer. (See FIG. 7).
  • the API response parameter reflection destination setting unit 116 sets response parameters of the adapterized API to which the response parameters of the called wholesale service API are reflected. More specifically, the API response parameter reflection destination setting unit 116 stores the response parameter (see FIG. 10) of the adapterized API to which the response parameter of the wholesale service API specified by the developer in charge is reflected, into an API parameter database 250 described later. (See FIG. 7).
  • the API request / response parameter design support unit 117 sets the source of the request parameter of the wholesale service API and the reflection destination of the response parameter without being specified by the developer. More specifically, the API request / response parameter design support unit 117 defines the request parameters of the adapter API as the acquisition source based on the object 215, the parameters 216, and the type 217 of the request parameters 214 (see FIG. 5) of the wholesale service API. This is reflected in an API parameter database 250 (see FIG. 7) described later. Further, the API request / response parameter design support unit 117 defines the response parameters of the adaptation API to be reflected on the basis of the object 220, the parameters 221 and the type 222 of the response parameters 219 (see FIG. 5) of the wholesale service API. This is reflected in the API parameter database 250 (see FIG. 7) described later.
  • FIG. 7 is a diagram illustrating a data configuration of the API parameter database 250 according to the present embodiment.
  • the API parameter database is, for example, data in a table format, and one row (record) indicates a parameter of the wholesale service API, and the API 251, type 252, processing 253, parameter type 254, object 255, parameter 256, input source / A column (attribute) of the reflection destination 257 is included.
  • the API 251 and the type 252 are the same as the API 231 and the type 232 of the API execution order database 230 (see FIG. 6), respectively, and the parameters of the wholesale service API indicated by the record indicate which adapter-ized API is called.
  • the process 253 corresponds to the process 235 and the execution order 233 of the API execution order database 230, and indicates which wholesale service API is called by the parameter indicated by the record. Since the adapter API may call the same wholesale service API a plurality of times, the wholesale service API to be called in combination of the process 235 and the execution order 233 is specified.
  • the parameter type 254 is a type of the parameter, and is “request” or “response”.
  • the object 255 corresponds to the object 215 of the request parameter 214 or the object 220 of the response parameter 219 shown in FIG.
  • the parameter 256 corresponds to the parameter 216 of the request parameter 214 or the parameter 221 of the response parameter 219. With the object 255 and the parameter 256, it is possible to specify which parameter of the wholesale service API shown in the process 253.
  • the input source / reflection destination 257 is a parameter of the adapter API which is the input source or the reflection destination.
  • the object 255 of the request parameter is “AuthRequest”.
  • the input source of the parameter 256 “email” is “accountInfo.email” of the adapterized API.
  • the input source of the parameter 256 “name” in which the request parameter object 255 is “Network” in the call of the wholesale service API of “postNetwork” whose execution order is “4” is adapterized It indicates that the API is "productOrder.characteristic.network.name”.
  • the call destination of the “postAuth” wholesale service API whose execution order is “1” (refer to the record 243 in FIG. 6) is a parameter 256 “apiToken” in which the response parameter object 255 is “AuthResponse”. , "InternalData.apiToken" of the adapterized API.
  • the source code generation unit 118 generates the source code (see FIG. 21 described later) of the API call logic unit 922 based on the information stored in the API execution order database 230 and the API parameter database 250. This source code generation processing will be described with reference to FIGS. 19 and 20 described later.
  • the adapter generation unit 119 compiles the source code and generates an API adapter unit 920 including the order reception unit 921 and the wholesale service API execution unit 923.
  • the storage unit 120 includes a wholesale service API specification database 210, an API execution order database 230, an API parameter database 250, an API adapter source code repository 270, and an API adapter execution file repository 280.
  • the wholesale service API specification database 210, API execution order database 230, and API parameter database 250 have already been described.
  • the API adapter source code repository 270 is a repository for the API adapter source code, and the adapter generation unit 119 stores the generated source code in the API adapter source code repository 270.
  • the API adapter execution file repository 280 is a repository for an API adapter execution file, and the adapter generation unit 119 stores the API adapter execution file compiled and generated in the API adapter execution file repository 280.
  • FIG. 8 is a diagram showing an execution order setting screen 400 displayed by the API adapter creation device 100 according to the present embodiment.
  • a wholesale service API specification area 410 is displayed.
  • a list of API name icons 411 and 412 of the wholesale service API is displayed. Note that the name displayed on the API name icon is a link between the method 212 and the endpoint 213 of the API specification 229 (see FIG. 5) of the wholesale service.
  • a control component area 421 including an “if” icon 422 and a “for” icon 423 is displayed.
  • An adapter logic area 431 is displayed on the right side of the execution order setting screen 400.
  • the adapter logic area 431 is divided into a new adapter logic area 432, a changed adapter logic area 433, and a deleted adapter logic area 434.
  • the operation of the developer in the new adapter logic area 432, the change adapter logic area 433, and the deletion adapter logic area 434, and the reflection of the execution order resulting from the operation in the API execution order database 230 (see FIG. 6) are as follows. , Except for the types 232 and 252, regardless of the area.
  • the new adapter logic area 432 will be described.
  • the developer can define the calling order (execution order) of the wholesale service API by dragging the API name icons 411 and 412 in the wholesale service API specification area 410 and dropping it in the new adapter logic area 432. it can.
  • the execution order is called in the order of “POST / auth” and “POST / network”.
  • the API execution order setting unit 112 stores the execution order defined in the new adapter logic area 432 in the API execution order database 230 as the records 241 and 242 in FIG.
  • the name of the adapter API is “XXX”.
  • the name of the adapter API is “YYY”.
  • FIG. 9 is a diagram showing a parameter setting screen 440 displayed by the API adapter creation device 100 according to the present embodiment.
  • the API adapter creation device 100 A parameter setting screen 440 is displayed.
  • An input / output data area 450 is displayed on the left side of the parameter setting screen 440.
  • the input / output data area 450 is an area in which data included in request parameters and response parameters of the adapterized API is displayed including its tree structure.
  • the developer defines the request parameter and the response parameter of the adapter API while editing and referring to the input / output data area 450.
  • an API request / response parameter setting area 460 is displayed.
  • a name icon ("POST / network" in FIG. 5)
  • an expected response (displayed as "201" in FIG. 5) of the wholesale service API for which the parameter is to be set are displayed.
  • a request parameter setting table 470 is displayed below the upper area 461.
  • the request parameter setting table 470 is tabular data, one row (record) indicates one request parameter, and columns (attributes) of an object 471, a parameter 472, a type 473, an acquisition source 474, and a value 475.
  • the API request parameter acquisition source setting unit 115 refers to the request parameter 214 of the wholesale service API specification database 210 (see FIG. 5) and displays the object 471, the parameter 472, and the type 473.
  • the API request parameter obtainment source setting unit 115 displays the acquisition source parameter on the acquisition source 474. For example, if the developer specifies that the acquisition source of the “name” parameter shown in the record 479 is the “name” parameter 453 displayed in the input / output data area 450, the API request parameter acquisition source setting unit 115 , The “productOrder” parameter 451 including the “name” parameter 453 is displayed on the acquisition source 474. Further, the API request parameter acquisition source setting unit 115 reflects this designation (setting) in the API parameter database 250 (see the record 262 in FIG. 7).
  • the name of the wholesale service API on the parameter setting screen 440 connects the method 212 of the wholesale service API specification 229 (see FIG. 5) and the endpoint 213 like “POST / network” on the name icon. It has a name.
  • the name of the wholesale service API in the API parameter database 250 is the API name 211 of the API specification 229 of the wholesale service included in the process 253. The developer can also specify the value of the request parameter without specifying the source of the request parameter. At this time, a value is designated as the value 475.
  • FIG. 10 is a diagram showing a parameter setting screen 440 of a response parameter displayed by the API adapter creation device 100 according to the present embodiment.
  • the request parameter setting table 470 is not displayed in a folded state.
  • toggle button 464 When toggle button 464 is clicked, it is expanded and request parameter setting table 470 (see FIG. 9) is displayed. At this time, the display label of the toggle button 464 is "-", and when clicked again, the request parameter setting table 470 is not displayed in a folded state.
  • the response parameter setting table 480 is tabular data.
  • One row (record) indicates one response parameter, and includes columns (attributes) of an object 481, a parameter 482, a type 483, and a reflection destination 484.
  • the API response parameter reflection destination setting unit 116 refers to the response parameter 219 of the wholesale service API specification database 210 (see FIG. 5) and displays the object 481, the parameter 482, and the type 483.
  • the API response parameter reflection destination setting unit 116 displays the parameters of the reflection destination on the reflection destination 484. For example, when the developer designates the “id” parameter 455 displayed in the input / output data area 450 as the reflection destination of the “id” parameter shown in the record 489, the API response parameter reflection destination setting unit 116 , The “product” parameter 454 including the “id” parameter 455 is displayed on the reflection destination 484. Further, the API response parameter reflection destination setting unit 116 reflects this designation (setting) in the API parameter database 250 (see a record 264 in FIG. 11 described later).
  • FIG. 11 is a diagram for explaining a record 264 included in the API parameter database 250 according to the present embodiment.
  • the record 264 indicates that the destination of the parameter 256 “id” whose response parameter object 255 is “Network” in the call of the wholesale service API of “postNetwork” whose execution order is “4” (see record 246 in FIG. 6) , "Product.characteristic.network.id" of the adapterized API.
  • the developer can specify the acquisition source of the request parameter of the wholesale service API and the reflection destination of the response parameter on the screen of the API adapter creation device 100.
  • the name of the request parameter of the wholesale service API matches the name of the request parameter of the adapter API that is the acquisition source, or the name of the response parameter of the wholesale service API and the adapter API that is the reflection destination If the name of the response parameter matches, the acquisition source and the reflection destination can be set without specifying by the developer.
  • FIG. 12 is a diagram showing a parameter setting screen 440 for request parameters displayed by the API adapter creation device 100 according to the present embodiment.
  • the request parameter setting table 470A displays a “name” parameter and a “description” parameter.
  • the API request / response parameter design support unit 117 outputs the “productOrder” parameter 451
  • the parameters having the same name in the parameters included in the request parameter setting table 470A are searched for, and the acquisition source 474 is set and reflected in the API parameter database 250 (see FIG. 13 described later). Records 262, 265).
  • the API request / response parameter design support unit 117 executes the “Network” object immediately below “productOrder.characteristic”.
  • a 471 type parameter “productOrder.characteristic.network” is defined, set as an acquisition source, and reflected in the API parameter database 250.
  • the API request / response parameter design support unit 117 sets a reflection destination for the response parameter, and reflects the response parameter in the API parameter database 250.
  • FIG. 13 is a diagram for explaining the records 262 and 265 included in the API parameter database 250 according to the present embodiment.
  • the record 262 is described in FIG.
  • the record 265 indicates that the source of the parameter 256 “description” in which the request parameter object 255 is “Network” in the call of the wholesale service API of “postNetwork” whose execution order is “4” (see record 246 in FIG. 6). , "ProductOrder.characteristic.network.description" of the adapterized API.
  • FIG. 14 is a diagram showing an execution order setting screen 400A displayed by the API adapter creation device 100 according to the present embodiment. With reference to FIG. 14, a process for defining conditional execution will be described.
  • FIG. 15 is a diagram showing an execution condition setting screen 491 displayed by the API adapter creation device 100 according to the present embodiment.
  • An input / output data area 450 is displayed on the right side of the execution condition setting screen 491, and an execution condition setting area 492 is displayed on the left side.
  • the developer in charge combines the execution condition setting area 492 with parameters and constants (for example, true and false values, numeric values, and character strings), comparison operators, numeric operators, and functions in the input / output data area 450, Specifies the expression that is the execution condition.
  • the execution condition specifies that the value of the parameter “productOrder.characteristic.network.enable” is true.
  • FIG. 16 is a diagram for explaining records in the API parameter database 250 according to the present embodiment.
  • records 271 to 274 are stored in the API execution order database 230.
  • processes are defined in the order of “POST / auth”, “if”, and “POST / network”, and correspond to records 271 to 273, respectively.
  • Record 274 indicates the end of the conditional execution indicated in record 272.
  • an expression of the execution condition defined in the execution condition setting area 492 (see FIG. 15) is stored.
  • FIG. 17 is a diagram showing an execution order setting screen 400B displayed by the API adapter creation device 100 according to the present embodiment. With reference to FIG. 17, a process for defining the repetitive execution will be described.
  • the wholesale service API is called in the order of "POST / auth” and "POST / network” of conditional execution.
  • the developer in charge drags the “for” icon 423 and displays “POST / auth” and “if” displayed in the new adapter logic area 432A. Drop between.
  • the API repetition execution setting unit 114 detects this drop, and displays the “if” icon and the API name icon of “POST / network” on the right side by one row as displayed in the new adapter logic area 432B of FIG. Move and display, indicating that the conditional execution "POST / network” will be executed repeatedly.
  • FIG. 18 is a diagram showing a repetition condition setting screen 495 displayed by the API adapter creation device 100 according to the present embodiment.
  • An input / output data area 450 is displayed on the left side of the execution condition setting screen 491, and a repetition condition setting area 496 is displayed on the right side.
  • the developer sets the repetition condition in the repetition condition setting area 496 by defining the parameters in the input / output data area 450 as the repetition variable.
  • a parameter “productOrder.characteristic.network” is defined as a repeated variable. This parameter is an array, and specifies that the processing is repeated for each element of the array.
  • Record 248 indicates the end of the repetitive execution indicated in record 244.
  • a repeat variable defined in the repeat condition setting area 496 (see FIG. 18) is stored.
  • Record 247 indicates the end of the conditional execution indicated in record 245.
  • an expression of the execution condition defined in the execution condition setting area 492 (see FIG. 15) is stored.
  • FIG. 19 is a flowchart illustrating a source code generation process executed by the source code generation unit 118 according to the present embodiment.
  • FIG. 20 is a flowchart illustrating a main process output process executed by the source code generation unit 118 according to the present embodiment.
  • the main body output processing is the processing of step S204 in FIG.
  • FIG. 21 shows a source code 290 generated by the source code generation unit 118 according to the present embodiment.
  • the source code generation process is a process executed in step S104 (see FIG. 3).
  • An adapterized API is defined as a method of a class in an object-oriented language.
  • Line 1 is a declaration of a class name, and the lines after line 1 are class definitions (class descriptions).
  • Line 28 is the end line of the class definition.
  • the class name includes the name of the adapter API (see API 231 in FIG. 6) and the type (see type 232 in FIG. 6).
  • Line 3 is a method name declaration of the method which is the adapterized API, and line 3 and subsequent lines are the method definition.
  • Line 27 is the end line of the method definition.
  • the method definitions (line 5 to line 26) described below are the logic of the adapter API, and the processes stored in the records 243 to 248 (see FIG. 6) are output as source code.
  • Line 9 is a call for “postAuth” of the wholesale service API.
  • Lines 5 to 7 are codes for generating a “postAuth” request parameter before calling “postAuth”, and the value of the request parameter (acquisition source) of the adapterized API is used as the “postAuth” request parameter.
  • Lines 11 and 12 are codes for setting the response parameter of “postAuth” to the response parameter (reflection destination) of the adapter API.
  • Line 14 is the beginning of a for sentence including a repeat condition, and line 26 is the end line of the for sentence.
  • Line 15 is the start of the if statement including the execution condition, and line 25 is the end line of the if statement.
  • Lines 16 to 24 are processes included in the if statement, and call “postNetwork” of the wholesale service API in line 21, process request parameters in lines 16 to 19, and process response parameters in lines 23 to 24. including.
  • step S201 of FIG. 19 the source code generation unit 118 outputs the class name declaration line shown in line 1 of the source code 290.
  • “Add” in the class name “AddYYYProcess” included in the class name declaration line indicates that the adapter API is new (the type 232 in FIG. 6 is “A”).
  • “YYY” is the name of the adapter API (see API 231 in FIG. 6).
  • step S202 the source code generation unit 118 outputs the method name declaration line shown in line 3 of the source code 290. “InteractWithPartner” in the method name is a fixed name.
  • step S203 the source code generation unit 118 repeats the main processing output of step S204 for each process included in the logic of the adapter function.
  • the processing included in the logic of the records 243 to 248 is the processing shown in the records 243 and 244. Since the processes shown in the records 245 to 247 are included in the repetition process of “for” shown in the record 244, they are not subjected to the repetition process of step S203.
  • the processing of the record 248 is the end of the repetitive processing of the record 244, and is processed as a part of the main body output processing for the record 244.
  • step S205 the source code generation unit 118 determines whether or not step S204 has been executed for all processes included in the logic of the adapter function. If step S204 has been executed for all processes, the process proceeds to step S206, and if there is any remaining process, step S204 is executed for the next process. Lines 5 to 26 of the source code 290 are output in the processing of steps S203 to S205.
  • step S206 the source code generation unit 118 outputs the line 27 of the source code 290, which is the end line of the method definition.
  • step S207 the source code generation unit 118 outputs the line 28 of the source code 290, which is the end line of the class definition.
  • the main body output process is a recursive process in which the main body output process which is itself is called in steps S238 and S243.
  • the main body output processing is executed twice: “postAuth” corresponding to the record 243, and “for” corresponding to the record 244. Many body output processes are performed.
  • step S231 if the processing type 234 (refer to FIG. 6) is “API execution” (call of the wholesale service API), the source code generation unit 118 proceeds to step S232 (step S231 ⁇ API execution) and sets the processing type 234 to “ If the process 235 is “for” in “control” (step S231 ⁇ for), the process proceeds to step S235. If the process type 234 is “control” and the process 235 is “if” (step S231 ⁇ if), the process proceeds to step S241.
  • step S232 the source code generator 118 outputs a code for setting a request parameter.
  • the source code generation unit 118 refers to the record corresponding to the wholesale service API to be called, which is included in the API parameter database 250 (see FIG. 7), and converts the request parameter of the adapterized API to the request parameter of the wholesale service API. Generate source code to be set to.
  • the source code generation unit 118 in the API parameter database 250 (see FIG. 7), the process 253 includes “postAuth” of the process 235 of the record 243 and “1” of the execution order 233, and the parameter type 254 indicates “request”. ".
  • the source code generation unit 118 outputs a code for generating the object 255 of the record of the search result and a code for setting the input source / reflection destination 257 in the parameter 256 of the object 255 included in the record of the search result. .
  • the record 261 is searched, and a line 5 of the source code 290 for generating an object and a line 6 for setting a parameter are output.
  • Line 7 of the source code 290 is also searched and output in the same manner as the record 261. If the code for generating the object has been output, the code for generating the object is not output.
  • step S233 the source code generator 118 outputs a code for calling the wholesale service API.
  • the source code generation unit 118 outputs line 9 of the source code 290.
  • step S234 the source code generator 118 outputs a code for setting a response parameter.
  • the source code generation unit 118 refers to the record corresponding to the wholesale service API to be called, which is included in the API parameter database 250, and sets the response parameter of the wholesale service API to the response parameter of the adapterized API.
  • the source code generation unit 118 in the API parameter database 250 (see FIG. 7), the process 253 includes “postAuth” of the process 235 of the record 243 and “1” of the execution order 233, and the parameter type 254 indicates “response”. ".
  • the source code generation unit 118 outputs a code for acquiring the object 255 of the record of the search result and a code for setting the parameter 256 to the parameter of the input source / reflection destination 257.
  • step S235 the source code generation unit 118 generates a repetition control variable. Specifically, the source code generation unit 118 generates a control variable of a repetition variable included in the additional information 236.
  • the repetition variable in the additional information 236 of the record 244 is “productOrder.characteristic.network”, which is an array variable. Therefore, the source code generation unit 118 generates an integer variable “i” as a control variable representing an index of the array.
  • step S236 the source code generation unit 118 outputs a for line. More specifically, the source code generation unit 118 outputs a generated control variable and a for line including the repetition variable in the additional information 236.
  • the source code generation unit 118 sets the initial value of the control variable to 0, and increments the control variable by one, and sets “productOrder.characteristic.network.length”, which is the length of the array of the repetition variable “productOrder.characteristic.network”.
  • the line 14 of the source code 290 is output, indicating that the above operation is repeated.
  • the source code generation unit 118 repeats the main body output process in step S238 for each process included in “for”.
  • the process included in “for” of the record 244 is only the process of “if” of the record 245.
  • the record 246 is a process included in “if” of the record 245, and the record 247 is an end of “if” of the record 245. Therefore, the source code generation unit 118 executes a main body output process for the process of the record 245. This processing will be described in detail in steps S241 to S245. In this process, lines 15 to 25 of the source code 290 are output.
  • step S240 source code generation section 118 outputs an end line. In the “for” of the record 244, the line 26 of the source code 290 is output.
  • step S241 the source code generation unit 118 outputs an if line including an execution condition.
  • “productOrder.characteristic.network” included in the execution condition is an array, and row 15 including the control variable “i” output in row 14 is output.
  • the source code generation unit 118 repeats the main body output processing in step S243 for each processing included in “if”.
  • the process included in “if” of the record 245 is only the process of “postNetwork” of the record 246. Therefore, the source code generation unit 118 executes a main body output process for the process of the record 246. This process is the same as “postAuth” described in steps S232 to S234, and the lines 16 to 24 of the source code 290 are output.
  • step S245 the source code generator 118 outputs an end line. In “if” of the record 245, the line 25 of the source code 290 is output.
  • API adapter creation device The developer defines the order, execution condition, and repetition condition of the wholesale service API called by the adapter API, and defines the relationship between the request / response parameter of the adapter API and the request / response parameter of the wholesale service API.
  • an API adapter can be developed. Since the developer does not need to write the source code and can concentrate on the examination of the logic, the development period is shortened, and new wholesale services and specification changes can be responded in a short time.
  • the definition of the execution order and the parameter relation described above is the design information, and there is no need to create a specification as the design information. Further, when the design information or the source code is changed, it is not necessary to correct the other. There is no inconsistency between the design information and the implementation (source code).
  • API adapter creation device 110 Control unit 111 Wholesale service API specification reference unit 112 API execution order setting unit 113 API execution condition setting unit 114 API repetition execution setting unit 115 API request parameter acquisition source setting unit 116 API response parameter reflection destination setting unit 117 API request / response parameter design support unit 118 Source code generation unit 119 Adapter generation unit 120 Storage unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

【課題】卸サービスの連携実行装置に備わる卸サービスのAPIアダプタを効率的に作成する。 【解決手段】APIアダプタ作成装置100は、開発担当者による、APIアダプタが提供するアダプタ化APIの内部処理が呼び出す卸サービスAPIの実行順序の設定、卸サービスAPIの要求パラメータの取得元となるアダプタ化APIの要求パラメータの設定、および、卸サービスAPIの応答パラメータの反映先となるアダプタ化APIの応答パラメータの設定を受け付ける。APIアダプタ作成装置100は、受け付けた設定に基づいて、ソースコードを生成する。

Description

APIアダプタ作成装置、APIアダプタ作成方法およびAPIアダプタ作成プログラム
 本発明は、複数サービス連携実行装置に備わるAPIアダプタを効率的に作成するAPIアダプタ作成装置、APIアダプタ作成方法およびAPIアダプタ作成プログラムに関する。
 近年、新たなデジタルサービスを創出するにあたり、全てを自社の設備で構築するのではなく、他事業者のデジタルサービス(卸サービス)を利用してエンドユーザにデジタルサービスを提供する、B2B2X(Business to Business to X)モデルの通信サービスが一般化しつつある。
 B2B2Xモデルのサービスの普及に伴って、複数の卸サービスを組み合わせた連携サービスを構築、運用するための、複数サービス連携実行装置の重要性が増している。新たな卸サービスの登場、および既存サービスの仕様変更が頻繁に行われるため、連携サービスの事業者は、低コスト・短期間で新しい卸サービスおよび既存サービスの仕様変更に追随することが求められる。
 事業者は、HTTP(HyperText Transfer Protocol)上のREST API(REpresentational State Transfer Application Program Interface)(以下、単にAPIとも記す)としてサービスを提供している。また、事業者は、APIの名称、アクセス先のURL(Uniform Resource Locator)やHTTPメソッド、パラメータなどのAPI仕様を規定して公開している。
 連携サービスを提供する事業者は、卸サービスのAPI仕様を参照して、卸サービスの組み合わせ方法を設計し、連携サービスを構築、提供する装置(複数サービス連携実行装置)を開発する。新しい卸サービスおよび既存サービスの仕様変更に容易に対応可能な複数サービス連携実行装置のアーキテクチャとして、非特許文献1,2に記載の技術がある。また、非特許文献1,2には、異なる卸サービスの仕様差分を吸収することで、新しい卸サービスや仕様変更にも容易に対応可能とするAPIアダプタが提案されている。
武直樹, 他5名, "Web APIアダプタ開発容易化に関する一考察," 第14回ネットワークソフトウェア(NWS)研究会, 電子情報通信学会, 2017年10月19日. 武直樹, 他5名, "APIアダプタ開発におけるSwagger Codegenの適用性," 電子情報通信学会総合大会講演, B-14-13, 電子情報通信学会, 2018年3月20日~23日.
 非特許文献1および非特許文献2には、APIアダプタの一部の構成要素(モジュール)について、市中ライブラリの活用、共通ライブラリ化、および卸サービスAPIの仕様に基づくソースコードの自動生成により、APIアダプタの開発が容易化できることが記載されている。しかしながら、APIアダプタには、人手による設計と実装が必要なモジュールが残っており、さらなる開発の容易化が望まれていた。
 このような背景に鑑みて本発明がなされたのであり、本発明は、複数サービス連携実行装置に備わる卸サービスのAPIアダプタを効率的に作成することができるAPIアダプタ作成装置、APIアダプタ作成方法、およびAPIアダプタ作成プログラムを提供することを課題とする。
 前記した課題を解決するため、請求項1に記載の発明は、複数の卸サービスを組み合わせた連携サービスを構築する複数サービス連携実行装置に備わる、前記卸サービスのAPI(Application Program Interface)アダプタが提供するアダプタ化APIを作成するAPIアダプタ作成装置であって、前記アダプタ化APIの内部処理が呼び出す前記卸サービスのAPIを示す卸サービスAPIの実行順序の設定を受け付けるAPI実行順序設定部と、前記卸サービスAPIの要求パラメータの取得元となる前記アダプタ化APIの要求パラメータの設定を受け付けるAPI要求パラメータ取得元設定部と、前記卸サービスAPIの応答パラメータの反映先となる前記アダプタ化APIの応答パラメータの設定を受け付けるAPI応答パラメータ反映先設定部と、前記実行順序の設定と、前記取得元の設定と、前記反映先の設定に基づいて、前記アダプタ化APIのソースコードを生成するソースコード生成部と、を備えることを特徴とするAPIアダプタ作成装置とした。
 また、請求項5に記載の発明は、複数の卸サービスを組み合わせた連携サービスを構築する複数サービス連携実行装置に備わる、前記卸サービスのAPIアダプタが提供するアダプタ化APIを作成するAPIアダプタ作成装置のAPIアダプタ作成方法であって、前記アダプタ化APIの内部処理が呼び出す前記卸サービスのAPIを示す卸サービスAPIの実行順序の設定を受け付けるステップと、前記卸サービスAPIの要求パラメータの取得元となる前記アダプタ化APIの要求パラメータの設定を受け付けるステップと、前記卸サービスAPIの応答パラメータの反映先となる前記アダプタ化APIの応答パラメータの設定を受け付けるステップと、前記実行順序の設定と、前記取得元の設定と、前記反映先の設定に基づいて、前記アダプタ化APIのソースコードを生成するステップと、を実行することを特徴とするAPIアダプタ作成方法とした。
 このようにすることで、APIアダプタ作成装置は、APIアダプタの開発担当者が規定した実行順序に従った卸サービスAPIの呼出しや、アダプタ化APIの要求パラメータからの卸サービスAPIの要求パラメータの取得、卸サービスの応答パラメータからのアダプタ化APIの応答パラメータへの反映を含んだソースコードを生成することが可能となる。このため、開発担当者は、ソースコードを記述する必要がなくなり、ロジックの検討に集中することができるようになる。結果として、APIアダプタの開発期間が短くなり、新しい卸サービスや仕様変更にも短期間で対応可能となる。
 請求項2に記載の発明は、前記卸サービスAPIの実行の実行条件の設定を受け付けるAPI実行条件設定部を、さらに備え、前記ソースコード生成部が、前記実行条件の設定の内容を含む、前記アダプタ化APIのソースコードを生成することを特徴とする請求項1に記載のAPIアダプタ作成装置とした。
 このようにすることで、APIアダプタ装置は、条件付きの卸サービスAPIの呼出しを含むソースコードを生成することができる。
 請求項3に記載の発明は、前記卸サービスAPIの繰返し実行の繰返し条件の設定を受け付けるAPI繰返し条件設定部を、さらに備え、前記ソースコード生成部が、前記繰返し条件の設定の内容を含む、前記アダプタ化APIのソースコードを生成することを特徴とする請求項1に記載のAPIアダプタ作成装置とした。
 このようにすることで、APIアダプタ装置は、繰返しの卸サービスAPIの呼出しを含むソースコードを生成することができる。
 請求項4に記載の発明は、前記卸サービスAPIの要求パラメータの指定を受け付けると、当該要求パラメータと同じ名称の前記アダプタ化APIの要求パラメータを取得元と設定し、前記卸サービスAPIの応答パラメータの指定を受け付けると、当該応答パラメータと同じ名称の前記アダプタ化APIの応答パラメータを反映先と設定するAPI要求応答パラメータ設計支援部を、さらに備え、前記ソースコード生成部は、前記API要求応答パラメータ設計支援部が設定した前記取得元および反映先の設定の内容を含む、前記アダプタ化APIのソースコードを生成することを特徴とする請求項1~3のいずれか1項に記載のAPIアダプタ作成装置とした。
 このようにすることで、開発担当者は、請求項1に記載のAPIアダプタ装置を用いる場合より少ない操作で要求パラメータと応答パラメータの設定が可能となり、APIアダプタの開発がより効率的になる。
 請求項6に記載の発明は、コンピュータを請求項1~4のいずれか1項に記載のAPIアダプタ作成装置として機能させるためのAPIアダプタ作成プログラムとした。
 このようにすることで、一般的なコンピュータを用いて、請求項1~4のいずれか1項に記載のAPIアダプタ装置を実現させることができる。
 本発明によれば、複数サービス連携実行装置に備わる卸サービスのAPIアダプタを効率的に作成することができるAPIアダプタ作成装置、APIアダプタ作成方法、およびAPIアダプタ作成プログラムを提供することができる。
本実施形態に係る複数サービス連携実行装置を含むネットワークシステムの構成を示す図である。 本実施形態に係るAPIアダプタ部の構成を示す図である。 本実施形態にAPI呼出しロジック部の開発手順を説明するためのフローチャートである。 本実施形態に係るAPIアダプタ作成装置の全体構成を示す図である。 本実施形態に係る卸サービスAPI仕様データベースのデータ構成を示す図である。 本実施形態に係るAPI実行順序データベースのデータ構成を示す図である。 本実施形態に係るAPIパラメータデータベースのデータ構成を示す図である。 本実施形態に係るAPIアダプタ作成装置が表示する実行順序設定画面を示す図である。 本実施形態に係るAPIアダプタ作成装置が表示するパラメータ設定画面を示す図である。 本実施形態に係るAPIアダプタ作成装置が表示する、応答パラメータのパラメータ設定画面を示す図である。 本実施形態に係るAPIパラメータデータベースに含まれるレコードを説明するための図である。 本実施形態に係るAPIアダプタ作成装置が表示する、要求パラメータのパラメータ設定画面を示す図である。 本実施形態に係るAPIパラメータデータベースに含まれるレコードを説明するための図である。 本実施形態に係るAPIアダプタ作成装置が表示する実行順序設定画面を示す図である。 本実施形態に係るAPIアダプタ作成装置が表示する実行条件設定画面を示す図である。 本実施形態に係るAPIパラメータデータベースのレコードを説明するための図である。 本実施形態に係るAPIアダプタ作成装置が表示する実行順序設定画面を示す図である。 本実施形態に係るAPIアダプタ作成装置が表示する繰返し条件設定画面を示す図である。 本実施形態に係るソースコード生成部が実行するソースコード生成処理を示すフローチャートである。 本実施形態に係るソースコード生成部が実行する本体処理出力処理を示すフローチャートである。 本実施形態に係るソースコード生成部が生成したソースコードである。
 以下では、APIアダプタを備える複数サービス連携実行装置の全体構成、APIアダプタの構成およびAPIアダプタ開発の課題を説明した後に、本発明を実施するための形態(実施形態)におけるAPIアダプタ作成装置(後記する図4参照)について説明する。
≪複数サービス連携実行装置の構成≫
 図1は、本実施形態に係る複数サービス連携実行装置900を含むネットワークシステムの構成を示す図である。複数サービス連携実行装置900は、連携実行装置本体部910およびAPIアダプタ部920A~920Cを備える。
 サービス事業者980は、複数サービス連携API970を介して、連携オーダ950を複数サービス連携実行装置900に発行し、連携サービス965を受け取る。連携オーダ950は、ネットワークAサービス951Aと、クラウドBサービス951Bと、アプリケーションCサービス(図1では、アプリCサービスと記載)951Cとが連携した連携サービス965を要求するメッセージである。
 連携実行装置本体部910は、受信した連携オーダ950に含まれるサービスを、卸サービス事業者から受け取って、連携させて、連携サービス965としてサービス事業者980に提供する。連携実行装置本体部910は、不図示のカタログ(設定ファイル)を参照して、連携オーダ950に含まれるネットワークAサービス951Aに対応する単体オーダ955Aと、クラウドBサービス951Bに対応する単体オーダ955Bと、アプリケーションCサービス951Cに対応する単体オーダ955Cとを生成する。
 連携実行装置本体部910は、単体オーダ955A~955Cをパラメータとして、連携実行装置本体部API973を介して卸サービスを要求する。連携実行装置本体部910は、サービス962A~962Cを受け取って、連携させることで連携サービス965を生成し、サービス事業者980に提供する。
 APIアダプタ部920Aは、単体オーダ955Aを受け付け、卸サービス事業者A985Aに卸サービスAPI975Aを介して、サービスA要求956Aを送信して、サービスA961Aを受け取り、サービス962Aを連携実行装置本体部910に提供する。
 APIアダプタ部920Bは、単体オーダ955Bを受け付け、卸サービス事業者B985Bに卸サービスAPI975Bを介して、サービスB要求956Bを送信して、サービスB961Bを受け取り、サービス962Bを連携実行装置本体部910に提供する。
 APIアダプタ部920Cは、単体オーダ955Cを受け付け、卸サービス事業者C985Cに卸サービスAPI975Cを介して、サービスC要求956Cを送信して、サービスC961Cを受け取り、サービス962Cを連携実行装置本体部910に提供する。
 卸サービスAPI975A~975Cは、卸サービス事業者A985A、卸サービス事業者B985Bおよび卸サービス事業者C985Cがそれぞれ独自に提供するAPIである。APIアダプタ部920A~920Cは、卸サービスAPI975A~975Cの差分を吸収し、共通の連携実行装置本体部API973を連携実行装置本体部910に提供している。
 このため、新たな卸サービスが出現し、その卸サービスAPIが提供されれば、対応するAPIアダプタ部を開発して、卸サービスをカタログに登録すれば、連携実行装置本体部910を変更することなく、複数サービス連携実行装置900は、新たな卸サービスを含んだ連携サービスを提供することができるようになる。このため、新たな卸サービスに対応する時間やコストは、APIアダプタ部920A~920Cの開発の時間やコストに依存することになり、開発の容易性が求められている。
≪APIアダプタ部の構成≫
 図2は、本実施形態に係るAPIアダプタ部920の構成を示す図である。APIアダプタ部920は、オーダ受付部921、API呼出しロジック部922および卸サービスAPI実行部923を備える。
 オーダ受付部921は、連携実行装置本体部910からの単体オーダ955を受け付け、オーダ内容を取得する。また、オーダ受付部921は、連携実行装置本体部910への応答処理を行う。
 API呼出しロジック部922は、単体オーダ955で要求されるサービスを取得するために、卸サービス事業者985が提供する個別サービスを、APIを介して呼び出す(実行する)。この際、API呼出しロジック部922は、卸サービス事業者985が提供する個別のサービスの実行順序に従って、個別サービスの要求パラメータを生成し、APIを介してサービスを呼び出して、応答パラメータを処理する。
 卸サービスAPI実行部923は、API呼出しロジック部922の呼出しに応じて、HTTP要求を組み立てて卸サービス事業者985に送信し、応答を受信してAPI呼出しロジック部922に出力する。
 オーダ受付部921は、共通ライブラリ化することで、効率的な開発が可能となっている。また、卸サービスAPI実行部923は、個別サービスのAPI仕様に基づいたソースコードの自動生成ツールを用いることで、効率的な開発が可能となっている(非特許文献2参照)。しかしながら、API呼出しロジック部922については、人手による設計と実装が必要であり、開発に要する時間とコストがかかっていた。
 本発明は、API呼出しロジック部922の設計において、最低限の項目だけを人手で設定することで、API呼出しロジック部922のソースコードを生成するものであり、効率的なAPIアダプタ部920の開発を可能とする。
 なお、以下の説明では、卸サービスAPIを介して卸サービスを要求する(呼び出す)ことを、卸サービスと卸サービスAPIとを同一視して、卸サービスAPIを呼び出す(実行する)などとも記す。
≪API呼出しロジック部の開発手順≫
 図3は、本実施形態に係るAPI呼出しロジック部922の開発手順を説明するためのフローチャートである。図3および図2を参照しながら、開発担当者が、APIアダプタ作成装置(後記する図4参照)を利用して行うAPI呼出しロジック部922の開発手順を説明する。
 ステップS101において、開発担当者は、卸サービスのAPIを理解する。詳しくは、開発担当者は、卸サービス事業者985が提供するAPIの仕様を参照したり、市中のAPIテストツールを利用したりして、仕様を確認(APIの動作検証)しながら、卸サービスAPIを理解する。
 ステップS102において、開発担当者は、API(連携実行装置本体部API973として提供されるAPIであり、APIアダプタ部920がサポートするAPIであって、開発対象のAPIであり、アダプタ化APIとも記す)のロジックを規定する。詳しくは、開発担当者は、アダプタ化APIを決定し、アダプタ化APIを機能させるために必要な、卸サービスの個別サービス(卸サービスAPI)の実行順序(後記する図8参照)や実行条件(後記する図14、図15参照)、繰返し条件(後記する図17、図18参照)を規定する(設定する)。
 なお、以下では、アダプタ化APIとその内部処理とを同一視して、アダプタ化APIが卸サービス(卸サービスAPI)を呼び出す(実行する)とも記す。
 ステップS103において、開発担当者は、パラメータを規定する。詳しくは、開発担当者は、個別サービスの要求パラメータの取得元となる単体オーダ955に含まれる要求パラメータ(後記する図9参照)、個別サービスの応答パラメータの反映先となるサービス962の応答パラメータ(後記する図10参照)を規定する。
 ステップS104において、開発担当者は、APIアダプタ作成装置にAPI呼出しロジック部922のソースコード(後記する図21参照)の生成を指示する。
 ステップS105において、開発担当者は、APIアダプタ作成装置にオーダ受付部921および卸サービスAPI実行部923を含めたAPIアダプタ部920の実行ファイルの生成を指示する。
 上記説明において、開発担当者が、ステップS101~S105を順次行うように説明した。しかし、ステップS103の途中で卸サービスAPIの理解が不足していたことが判明してステップS101,S102に戻ったり、実行ファイルを実行して動作に不具合が見つかってステップS102,S103に戻ったりしながら、アダプタ化API(APIアダプタ部920)を開発する。
≪APIアダプタ装置の全体構成≫
 図4は、本実施形態に係るAPIアダプタ作成装置100の全体構成を示す図である。図4を参照しながら、図3のステップS102~S105で説明した、開発担当者がAPIアダプタの開発に利用するAPIアダプタ作成装置100の構成を説明する。
 APIアダプタ作成装置100は、制御部110、記憶部120および入出力部130を含んで構成される。入出力部130は、キーボードやマウスなどの入力装置(不図示)やディスプレイといった出力装置(不図示)から構成され、開発担当者が規定するアダプタ化APIのロジックやパラメータを受け付けて、表示する。
 制御部110は、CPU(Central Processing Unit)から構成され、卸サービスAPI仕様参照部111、API実行順序設定部112、API実行条件設定部113、API繰返し実行設定部114、API要求パラメータ取得元設定部115、API応答パラメータ反映先設定部116、API要求応答パラメータ設計支援部117、ソースコード生成部118およびアダプタ生成部119を備える。
 卸サービスAPI仕様参照部111は、卸サービスの標準形式で記述されたAPI仕様を読み込み、後記する記憶部120の卸サービスAPI仕様データベース210(図4では卸サービスAPI仕様DB(Database)と記載、後記する図5参照)に格納する。また、卸サービスAPI仕様参照部111は、読み込んだ卸サービスのAPI仕様に含まれるAPIの名称やパラメータをディスプレイに表示する。
≪卸サービスAPI仕様データベース≫
 図5は、本実施形態に係る卸サービスAPI仕様データベース210のデータ構成を示す図である。卸サービスAPI仕様データベース210は、卸サービス事業者985(図2参照)が提供する個別サービスのAPI仕様229から構成される。各々のAPI仕様229は、API名称211、メソッド212、エンドポイント213、要求パラメータ214、応答パラメータ219および期待応答224の記述を含む。
 API名称211は、APIの名称である。メソッド212は、APIを呼び出すときのHTTPメソッドであり、GETやPOSTなどがある。エンドポイント213は、APIを呼び出すときのアドレスである。
 要求パラメータ214は、例えば表形式のデータであって、1つの行(レコード)は、1つの要求パラメータを表し、オブジェクト215、パラメータ216および型217の列(属性)を含む。オブジェクト215は、レコードが示すパラメータを含むオブジェクトの名称である。パラメータ216はパラメータの名称である。型217は、パラメータの型である。レコード218は、「AuthRequest」オブジェクトに含まれ、型が「string」である「email」パラメータを表している。
 応答パラメータ219は、例えば表形式のデータであって、1つのレコードは、1つの応答パラメータを表し、オブジェクト220、パラメータ221および型222の属性を含む。オブジェクト220、パラメータ221および型222の意味は、それぞれオブジェクト215、パラメータ216および型217と同様である。レコード223は、「AuthResponse」オブジェクトに含まれ、型が「string」である「apiToken」パラメータを表している。
 期待応答224は、APIを呼び出した後の正常な応答時のHTTPステータスコードを示す。
≪APIアダプタ作成装置の制御部(ロジック設定)≫
 図4に戻り、API実行順序設定部112は、アダプタ化APIが呼び出す卸サービスAPIの順序を設定する。詳しくは、API実行順序設定部112は、開発担当者が規定した卸サービスAPIの呼出し順序(実行順序)(後記する図8参照)を、後記するAPI実行順序データベース230(図6参照)に反映する。
 API実行条件設定部113は、アダプタ化APIが呼び出す卸サービスAPIの実行条件を設定する。詳しくは、API実行条件設定部113は、開発担当者が規定した条件付きで呼び出す卸サービスAPI(後記する図14参照)やその実行条件(呼出し条件、後記する図15参照)を、後記するAPI実行順序データベース230に反映する。
 API繰返し実行設定部114は、アダプタ化APIが繰り返し呼び出す卸サービスAPIを設定する。詳しくは、API繰返し実行設定部114は、開発担当者が規定した、繰り返して呼び出す卸サービスAPI(後記する図17参照)や繰返し条件(後記する図18参照)を、後記するAPI実行順序データベース230に反映する。
≪API実行順序データベース≫
 図6は、本実施形態に係るAPI実行順序データベース230のデータ構成を示す図である。API実行順序データベース230は、例えば表形式のデータであり、1つの行(レコード)は、1つのアダプタ化APIにおける処理を示す。各レコードは、API231、種別232、実行順序233、処理種別234、処理235および付加情報236の列(属性)を含む。
 API231は、アダプタ化APIの名称である。種別232は、アダプタ化APIの種別であり、「A」で示される新規、「M」で示される変更、「D」で示される削除がある。1つのアダプタ化APIは、API231と種別232との組み合わせで特定される。
 実行順序233は、1つのアダプタ化APIにおける実行順序を示す。処理種別234は、レコードが示す処理の種別を示し、卸サービスAPIの呼出しを示す「API実行」と、条件付き実行や繰返し実行を示す「制御」とがある。
 処理235は、処理内容を示す。処理種別234が「API実行」である場合には、処理235は、呼び出す卸サービスのAPI名称(図5のAPI名称211参照)である。処理種別234が「制御」の場合には、処理235は、条件付き実行の開始と実行条件を示す「if」、条件付き実行の終了を示す「end if」、繰返し実行の開始と繰返し条件を示す「for」、または、繰返し実行の終了を示す「end for」である。
 付加情報236は、実行条件または繰返し条件である。
 レコード241,242は、種別232が「A」(新規)の「XXX」というアダプタ化APIは、最初に卸サービスのAPI「postAuth」を呼び出し(実行し)、次に「postNetwork」を呼び出すことを示している。
 レコード243~248は、種別232が「A」の「YYY」というアダプタ化APIは、最初に「postAuth」を呼び出し(レコード243参照)、続いて繰返し処理(レコード244参照)を行うことを示している。繰返し処理の条件は、レコード244の付加情報236に示される「productOrder.characteristic.network」である。詳しくは、「productOrder.characteristic.network」は、配列を示す変数であり、この配列の要素ごとに処理を繰り返す。繰り返す処理の内容は、レコード244の処理235である「for」に対応する「end for」(レコード248参照)までの処理であり、レコード245~247で示される処理を繰り返す。
 以下、レコード245~247の処理を説明する。レコード245は、条件付き実行を示しており、その条件は付加情報236に示される「productOrder.characteristic.network.enable == true」である。「productOrder.characteristic.network.enable」で示させるパラメータの値が「true」ならば、処理を実行する。実行される処理の内容は、レコード245の処理235である「if」に対応する「end if」(レコード247参照)までの処理であり、レコード246で示される卸サービスAPI「postNetwork」を呼び出す処理である。
≪APIアダプタ作成装置の制御部(パラメータ設定)≫
 図4に戻り、API要求パラメータ取得元設定部115は、呼び出される卸サービスAPIの要求パラメータの取得元となるアダプタ化APIの要求パラメータを設定する。詳しくは、API要求パラメータ取得元設定部115は、開発担当者が規定した、卸サービスAPIの要求パラメータの取得元となるアダプタ化APIの要求パラメータ(図9参照)を、後記するAPIパラメータデータベース250(図7参照)に反映する。
 API応答パラメータ反映先設定部116は、呼び出された卸サービスAPIの応答パラメータの反映先となるアダプタ化APIの応答パラメータを設定する。詳しくは、API応答パラメータ反映先設定部116は、開発担当者が規定した、卸サービスAPIの応答パラメータの反映先となるアダプタ化APIの応答パラメータ(図10参照)を、後記するAPIパラメータデータベース250(図7参照)に反映する。
 API要求応答パラメータ設計支援部117は、開発担当者が規定することなく、卸サービスAPIの要求パラメータの取得元や応答パラメータの反映先を設定する。詳しくは、API要求応答パラメータ設計支援部117は、卸サービスAPIの要求パラメータ214(図5参照)のオブジェクト215、パラメータ216、型217に基づいて、取得元となるアダプタ化APIの要求パラメータを規定して、後記するAPIパラメータデータベース250(図7参照)に反映する。また、API要求応答パラメータ設計支援部117は、卸サービスAPIの応答パラメータ219(図5参照)のオブジェクト220、パラメータ221、型222に基づいて、反映先となるアダプタ化APIの応答パラメータを規定して、後記するAPIパラメータデータベース250(図7参照)に反映する。
≪APIパラメータデータベース≫
 図7は、本実施形態に係るAPIパラメータデータベース250のデータ構成を示す図である。APIパラメータデータベースは、例えば表形式のデータであり、1つの行(レコード)は、卸サービスAPIのパラメータを示し、API251、種別252、処理253、パラメータ種別254、オブジェクト255、パラメータ256、入力元/反映先257の列(属性)を含む。
 API251と種別252とは、API実行順序データベース230(図6参照)のAPI231と種別232とそれぞれ同様であり、レコードが示す卸サービスAPIのパラメータが、どのアダプタ化APIからの呼出しかを示す。処理253は、API実行順序データベース230の処理235と実行順序233とに対応し、レコードが示すパラメータが、どの卸サービスAPIの呼出しのパラメータかを示す。アダプタ化APIが、同じ卸サービスAPIを複数回呼び出す場合があるので、処理235と実行順序233との組み合わせで呼び出す卸サービスAPIを特定する。
 パラメータ種別254は、パラメータの種別であり、「要求」か「応答」である。オブジェクト255は、図5に示す要求パラメータ214のオブジェクト215または応答パラメータ219のオブジェクト220に対応する。また、パラメータ256は、要求パラメータ214のパラメータ216または応答パラメータ219のパラメータ221に対応する。オブジェクト255とパラメータ256とで、処理253に示される卸サービスAPIのどのパラメータであるかを特定できる。
 入力元/反映先257は、入力元または反映先となるアダプタ化APIのパラメータである。
 レコード261は、「A」の「YYY」というアダプタ化APIにおける実行順序が「1」の「postAuth」の卸サービスAPIの呼出し(図6のレコード243参照)において、要求パラメータのオブジェクト255が「AuthRequest」であるパラメータ256「email」の入力元は、アダプタ化APIの「accountInfo.email」であることを示している。
 レコード262は、実行順序が「4」の「postNetwork」の卸サービスAPIの呼出し(レコード246参照)において、要求パラメータのオブジェクト255が「Network」であるパラメータ256「name」の入力元は、アダプタ化APIの「productOrder.characteristic.network.name」であることを示している。
 レコード263は、実行順序が「1」の「postAuth」の卸サービスAPIの呼出し(図6のレコード243参照)において、応答パラメータのオブジェクト255が「AuthResponse」であるパラメータ256「apiToken」の反映先は、アダプタ化APIの「internalData.apiToken」であることを示している。
≪APIアダプタ作成装置の制御部(その他)≫
 図4に戻り、ソースコード生成部118は、API実行順序データベース230およびAPIパラメータデータベース250に格納された情報に基づいてAPI呼出しロジック部922のソースコード(後記する図21参照)を生成する。このソースコードの生成処理は、後記する図19と図20を参照して説明する。アダプタ生成部119は、ソースコードをコンパイルして、オーダ受付部921および卸サービスAPI実行部923を含むAPIアダプタ部920を生成する。
≪APIアダプタ作成装置の記憶部≫
 続いて、APIアダプタ作成装置100の記憶部120を説明する。記憶部120は、卸サービスAPI仕様データベース210、API実行順序データベース230、APIパラメータデータベース250、APIアダプタソースコードリボジトリ270およびAPIアダプタ実行ファイルリボジトリ280を備える。
 卸サービスAPI仕様データベース210、API実行順序データベース230、APIパラメータデータベース250は説明済みである。APIアダプタソースコードリボジトリ270は、APIアダプタのソースコードのリボジトリであり、アダプタ生成部119は生成したソースコードをAPIアダプタソースコードリボジトリ270に格納する。
 APIアダプタ実行ファイルリボジトリ280は、APIアダプタの実行ファイルのリボジトリであり、アダプタ生成部119はコンパイルして生成したAPIアダプタの実行ファイルをAPIアダプタ実行ファイルリボジトリ280に格納する。
≪ロジックとパラメータの設定処理≫
 以下、図8~図10、図12、図14~図15、図17~図18に示されるAPIアダプタ作成装置100の画面、および、図6~図7、図11、図13、図16に示されるAPI実行順序データベース230とAPIパラメータデータベース250とを参照して、図3のステップS102~S103の処理を説明する。詳しくは、開発担当者が規定する(設定する)ロジックやパラメータの内容、および、API実行順序設定部112、API実行条件設定部113、API繰返し実行設定部114、API要求パラメータ取得元設定部115、API応答パラメータ反映先設定部116、API要求応答パラメータ設計支援部117の処理内容を説明する。
≪実行順序設定≫
 図8は、本実施形態に係るAPIアダプタ作成装置100が表示する実行順序設定画面400を示す図である。実行順序設定画面400の左上には、卸サービスAPI仕様領域410が表示される。卸サービスAPI仕様領域410には、卸サービスAPIのAPI名称アイコン411,412の一覧が表示される。なお、API名称アイコンに表示される名称は、卸サービスのAPI仕様229(図5参照)のメソッド212とエンドポイント213とを連結したものとなっている。
 実行順序設定画面400の左下には、「if」アイコン422と「for」アイコン423を含む制御部品領域421が表示される。
 実行順序設定画面400の右側には、アダプタロジック領域431が表示される。アダプタロジック領域431は、新規アダプタロジック領域432と、変更アダプタロジック領域433と、削除アダプタロジック領域434とに分割される。新規アダプタロジック領域432と、変更アダプタロジック領域433と、削除アダプタロジック領域434とにおける開発担当者の操作、および、操作結果である実行順序のAPI実行順序データベース230(図6参照)への反映は、種別232,252を除いて領域によらず同様である。以下では、新規アダプタロジック領域432に関して説明する。
 開発担当者は、卸サービスAPI仕様領域410にあるAPI名称アイコン411,412をドラッグして、新規アダプタロジック領域432にドロップすることで、卸サービスAPIの呼出し順序(実行順序)を規定することができる。図8では、「POST/auth」、「POST/network」の順に呼び出す実行順序が規定されている。
 API実行順序設定部112は、新規アダプタロジック領域432に規定された実行順序を図6のレコード241,242として、API実行順序データベース230に格納する。なお、ここでは、アダプタ化APIの名称を「XXX」としている。以降の説明では、アダプタ化APIの名称を「YYY」とする。
 開発担当者が新規アダプタロジック領域432にあるAPI名称アイコンの右側にある「削除」ボタンをクリックすると、API実行順序設定部112は、当該API名称アイコンを削除し、API実行順序データベース230にある該当するレコードを削除する。
≪要求パラメータ設定≫
 図9は、本実施形態に係るAPIアダプタ作成装置100が表示するパラメータ設定画面440を示す図である。開発担当者が、実行順序設定画面400(図8参照)の新規アダプタロジック領域432にあるAPI名称アイコン「POST/network」の右側にある「設定」ボタンをクリックすると、APIアダプタ作成装置100は、パラメータ設定画面440を表示する。
 パラメータ設定画面440の左側には、入出力データ領域450が表示される。入出力データ領域450は、アダプタ化APIの要求パラメータや応答パラメータに含まれるデータが、その木構造を含めて表示される領域である。開発担当者は、入出力データ領域450を編集したり、参照したりしながら、アダプタ化APIの要求パラメータや応答パラメータを規定する。
 パラメータ設定画面440の右側には、API要求応答パラメータ設定領域460が表示される。API要求応答パラメータ設定領域460の上部領域461には、パラメータ設定対象となる卸サービスAPIの名称アイコン(図5では「POST/network」)と期待応答(図5では「201」と表示)が表示される。
 上部領域461の下には、要求パラメータ設定テーブル470が表示される。要求パラメータ設定テーブル470は、表形式のデータであり、1つの行(レコード)は、1つの要求パラメータを示し、オブジェクト471、パラメータ472、型473、取得元474および値475の列(属性)を含む。API要求パラメータ取得元設定部115は、卸サービスAPI仕様データベース210(図5参照)の要求パラメータ214を参照して、オブジェクト471、パラメータ472、型473を表示する。
 開発担当者が、要求パラメータ設定テーブル470にある卸サービスAPIの要求パラメータの取得元となる、入出力データ領域450に表示されるアダプタ化APIの要求パラメータを指定すると、API要求パラメータ取得元設定部115は、取得元474に取得元のパラメータを表示する。例えば、開発担当者が、レコード479に示される「name」パラメータの取得元は、入出力データ領域450に表示される「name」パラメータ453であると指定すると、API要求パラメータ取得元設定部115は、「name」パラメータ453を含む「productOrder」パラメータ451を取得元474に表示する。さらに、API要求パラメータ取得元設定部115は、この指定(設定)をAPIパラメータデータベース250に反映する(図7のレコード262参照)。
 なお、パラメータ設定画面440上での卸サービスAPIの名称は、名称アイコン上の「POST/network」のように、卸サービスのAPI仕様229(図5参照)のメソッド212とエンドポイント213とを連結した名称となっている。一方、APIパラメータデータベース250(図7参照)での卸サービスAPIの名称は、処理253に含まれる卸サービスのAPI仕様229のAPI名称211となっている。
 開発担当者は、要求パラメータの取得元を指定せず、要求パラメータの値を指定することもできる。このときには、値475に値を指定する。
≪応答パラメータ設定≫
 図10は、本実施形態に係るAPIアダプタ作成装置100が表示する、応答パラメータのパラメータ設定画面440を示す図である。図10では、要求パラメータ設定テーブル470は、折り畳まれて表示されていない。トグルボタン464がクリックされると、展開されて要求パラメータ設定テーブル470(図9参照)が表示される。このときには、トグルボタン464の表示ラベルは「-」になっており、再度クリックされると、要求パラメータ設定テーブル470は折り畳まれて表示されない。
 パラメータ設定画面440の左側の入出力データ領域450には、「productOrder」パラメータ451は折り畳まれて表示され、「product」パラメータ454が展開されて表示されている。
 応答パラメータ設定テーブル480は、表形式のデータであり、1つの行(レコード)は、1つの応答パラメータを示し、オブジェクト481、パラメータ482、型483および反映先484の列(属性)を含む。API応答パラメータ反映先設定部116は、卸サービスAPI仕様データベース210(図5参照)の応答パラメータ219を参照して、オブジェクト481、パラメータ482、型483を表示する。
 開発担当者が、応答パラメータ設定テーブル480にある卸サービスAPIの応答パラメータの反映先となる、入出力データ領域450に表示されるアダプタ化APIの応答パラメータを指定すると、API応答パラメータ反映先設定部116は、反映先484に反映先のパラメータを表示する。例えば、開発担当者が、レコード489に示される「id」パラメータの反映先は、入出力データ領域450に表示される「id」パラメータ455であると指定すると、API応答パラメータ反映先設定部116は、「id」パラメータ455を含む「product」パラメータ454を反映先484に表示する。さらに、API応答パラメータ反映先設定部116は、この指定(設定)をAPIパラメータデータベース250に反映する(後記する図11のレコード264参照)。
 図11は、本実施形態に係るAPIパラメータデータベース250に含まれるレコード264を説明するための図である。レコード264は、実行順序が「4」の「postNetwork」の卸サービスAPIの呼出し(図6のレコード246参照)において、応答パラメータのオブジェクト255が「Network」であるパラメータ256「id」の反映先が、アダプタ化APIの「product.characteristic.network.id」であることを示している。
≪パラメータの自動設定≫
 図9と図10で説明したように、開発担当者は、卸サービスAPIの要求パラメータの取得元や応答パラメータの反映先をAPIアダプタ作成装置100の画面上で指定することができる。卸サービスAPIの要求パラメータの名称と、その取得元であるアダプタ化APIの要求パラメータの名称とが一致している場合や、卸サービスAPIの応答パラメータの名称と、その反映先であるアダプタ化APIの応答パラメータの名称とが一致している場合には、開発担当者が指定しなくても取得元や反映先が設定可能である。
 図12は、本実施形態に係るAPIアダプタ作成装置100が表示する、要求パラメータのパラメータ設定画面440を示す図である。要求パラメータ設定テーブル470Aには、「name」パラメータと「description」パラメータとが表示されている。開発担当者が、「name」パラメータと「description」パラメータと「productOrder」パラメータ451とを指定して、「自動」ボタン456をクリックすると、API要求応答パラメータ設計支援部117は、「productOrder」パラメータ451の下位にあるパラメータと、要求パラメータ設定テーブル470Aに含まれるパラメータで名称が一致しているパラメータ同士を探し出して、取得元474を設定して、APIパラメータデータベース250に反映する(後記する図13のレコード262,265参照)。
 アダプタ化APIの要求パラメータである「productOrder」パラメータ451の下位に「Network」オブジェクト471が規定されていなければ、API要求応答パラメータ設計支援部117は、「productOrder.characteristic」の直下に「Network」オブジェクト471型のパラメータである「productOrder.characteristic.network」を規定し、取得元と設定して、APIパラメータデータベース250に反映する。
 API要求応答パラメータ設計支援部117は、応答パラメータについても同様に、反映先を設定して、APIパラメータデータベース250に反映する。
 図13は、本実施形態に係るAPIパラメータデータベース250に含まれるレコード262,265を説明するための図である。レコード262は、図7で説明している。レコード265は、実行順序が「4」の「postNetwork」の卸サービスAPIの呼出し(図6のレコード246参照)において、要求パラメータのオブジェクト255が「Network」であるパラメータ256「description」の取得元が、アダプタ化APIの「productOrder.characteristic.network.description」であることを示している。
≪条件付き実行設定≫
 図14は、本実施形態に係るAPIアダプタ作成装置100が表示する実行順序設定画面400Aを示す図である。図14を参照しながら、条件付き実行を規定する処理を説明する。
 図8に示した新規アダプタロジック領域432では、「POST/auth」、「POST/network」の順序で卸サービスAPIを呼び出すことが規定されていた。「POST/network」を条件付きで呼び出す(実行)する場合には、開発担当者は、「if」アイコン422をドラッグして新規アダプタロジック領域432に表示される「POST/auth」と「POST/network」との間にドロップする。API実行条件設定部113は、このドロップを検知して、図14の新規アダプタロジック領域432Aに表示されるように、「POST/network」のAPI名称アイコンを1段右側に移動して表示し、「POST/network」が条件付きで実行されることを示す。開発担当者が新規アダプタロジック領域432Aにある「if」アイコンの右側の「設定」ボタンをクリックすると、実行条件設定画面491(後記する図15参照)に遷移して、実行条件を規定することができるようになる。
 図15は、本実施形態に係るAPIアダプタ作成装置100が表示する実行条件設定画面491を示す図である。実行条件設定画面491の右側には入出力データ領域450が表示され、左側には実行条件設定領域492が表示される。開発担当者は、実行条件設定領域492に、入出力データ領域450にあるパラメータや定数(例えば、真偽の値や数値、文字列)、比較演算子、数値演算子、関数などを組み合わせて、実行条件となる式を規定する。図15では、実行条件として、パラメータ「productOrder.characteristic.network.enable」の値が真であることが規定されている。
 図16は、本実施形態に係るAPIパラメータデータベース250のレコードを説明するための図である。開発担当者が、図14と図15に示されるアダプタ化APIのロジックを規定した時点では、API実行順序データベース230に、レコード271~274が格納されている。新規アダプタロジック領域432Aには、「POST/auth」、「if」、「POST/network」の順に処理が規定されており、それぞれレコード271~273に対応する。レコード274は、レコード272に示される条件付き実行の終了を示す。レコード272の付加情報に236には、実行条件設定領域492(図15参照)に規定された実行条件の式が格納されている。
≪繰返し実行設定≫
 図17は、本実施形態に係るAPIアダプタ作成装置100が表示する実行順序設定画面400Bを示す図である。図17を参照しながら、繰返し実行を規定する処理を説明する。
 図14に示した新規アダプタロジック領域432Aでは、「POST/auth」、条件付き実行の「POST/network」の順序で卸サービスAPIを呼び出すことが規定されていた。条件付き実行の「POST/network」を繰り返して実行する場合には、開発担当者は、「for」アイコン423をドラッグして新規アダプタロジック領域432Aに表示される「POST/auth」と「if」との間にドロップする。API繰返し実行設定部114は、このドロップを検知して、図17の新規アダプタロジック領域432Bに表示されるように、「if」アイコンと「POST/network」のAPI名称アイコンとを1段右側に移動して表示し、条件付き実行の「POST/network」が繰返し実行されることを示す。開発担当者が新規アダプタロジック領域432Bにある「for」アイコンの右側の「設定」ボタンをクリックすると、繰返し条件設定画面495(後記する図18参照)に遷移して、繰返し条件を規定することができるようになる。
 図18は、本実施形態に係るAPIアダプタ作成装置100が表示する繰返し条件設定画面495を示す図である。実行条件設定画面491の左側には入出力データ領域450が表示され、右側には繰返し条件設定領域496が表示される。開発担当者は、繰返し条件設定領域496に、入出力データ領域450にあるパラメータを繰返し変数に規定することで繰返し条件を設定する。図18では、繰返し変数として、パラメータ「productOrder.characteristic.network」が規定されている。このパラメータは、配列であり、配列の各要素について処理を繰り返すことが規定されている。
 開発担当者が、図17と図15と図18に示されるアダプタ化APIのロジックを規定した時点では、API実行順序データベース230には、レコード243~248(図6参照)が格納されている。新規アダプタロジック領域432B(図17参照)には、「POST/auth」、「for」、「if」、「POST/network」の順に処理が規定されており、それぞれレコード243~246に対応する。
 レコード248は、レコード244に示される繰返し実行の終了を示す。レコード244の付加情報に236には、繰返し条件設定領域496(図18参照)に規定された繰返し変数が格納されている。
 レコード247は、レコード245に示される条件付き実行の終了を示す。レコード245の付加情報に236には、実行条件設定領域492(図15参照)に規定された実行条件の式が格納されている。
≪ソースコード生成処理≫
 図19は、本実施形態に係るソースコード生成部118が実行するソースコード生成処理を示すフローチャートである。図20は、本実施形態に係るソースコード生成部118が実行する本体処理出力処理を示すフローチャートである。本体出力処理とは、図19のステップS204の処理である。図21は、本実施形態に係るソースコード生成部118が生成したソースコード290である。図19~図21を参照しながら、API実行順序データベース230のレコード243~248に示されるアダプタ化APIのロジックがソースコード290として出力される処理を説明する。なお、ソースコード生成処理は、ステップS104(図3参照)において実行される処理である。
 ソースコード生成処理の説明を行う前に、生成されるアダプタ化APIのソースコード290の概要を説明する。アダプタ化APIはオブジェクト指向言語のクラスのメソッドとして定義される。
 行1は、クラス名の宣言であり、行1以降がクラス定義(クラスの記述)となる。行28は、クラス定義の終了行である。クラス名は、アダプタ化APIの名称(図6のAPI231参照)や種別(図6の種別232参照)を含む。
 行3は、アダプタ化APIであるメソッドのメソッド名宣言であり、行3以降がメソッド定義となる。行27は、メソッド定義の終了行である。以下に説明するメソッドの定義(行5~行26)がアダプタ化APIのロジックであり、レコード243~248(図6参照)に格納された処理がソースコードとして出力されたものである。
 行9は、卸サービスAPIの「postAuth」の呼出しである。行5~行7は、「postAuth」の呼出しの前に、「postAuth」の要求パラメータを生成するコードであって、アダプタ化APIの要求パラメータ(取得元)の値を「postAuth」の要求パラメータにセットするコードである。行11~行12は、「postAuth」の応答パラメータをアダプタ化APIの応答パラメータ(反映先)にセットするコードである。
 行14は、繰返し条件を含むfor文の始まりであり、行26は、for文の終了行である。
 行15は、実行条件を含むif文の始まりであり、行25は、if文の終了行である。
 行16~行24は、if文に含まれる処理であり、行21の卸サービスAPIの「postNetwork」の呼出し、行16~行19の要求パラメータの処理、行23~行24の応答パラメータの処理を含む。
 図19のステップS201において、ソースコード生成部118は、ソースコード290の行1に示されるクラス名宣言行を出力する。クラス名宣言行に含まれるクラス名「AddYYYProcess」の「Add」は、アダプタ化APIが新規(図6の種別232が「A」)であることを示している。「YYY」は、アダプタ化APIの名称(図6のAPI231参照)である。
 ステップS202において、ソースコード生成部118は、ソースコード290の行3に示されるメソッド名宣言行を出力する。メソッド名の「interactWithPartner」は、固定の名称である。
 ステップS203において、ソースコード生成部118は、アダプタ関数のロジックに含まれる処理ごとに、ステップS204の本体処理出力を繰り返す。レコード243~248におけるロジックに含まれる処理とは、レコード243,244に示される処理である。レコード245~247に示される処理は、レコード244に示される「for」の繰返し処理に含まれる処理であるため、ステップS203の繰返し処理の対象外となる。また、レコード248の処理は、レコード244の繰返し処理の終了であり、レコード244に対する本体出力処理の一部として処理される。
 ステップS204の本体処理出力は、後記する図20で説明する。
 ステップS205において、ソースコード生成部118は、アダプタ関数のロジックに含まれる全ての処理について、ステップS204を実行したか判断する。全ての処理についてステップS204を実行したならば、ステップS206に進み、残りの処理があれば、次の処理についてステップS204を実行する。ソースコード290の行5~行26は、ステップS203~S205の処理で出力される。
 ステップS206において、ソースコード生成部118は、メソッド定義の終了行であるソースコード290の行27を出力する。
 ステップS207において、ソースコード生成部118は、クラス定義の終了行であるソースコード290の行28を出力する。
≪ソースコード生成処理:本体出力処理≫
 続いて、図20を参照しながらステップS204の本体出力処理の詳細を説明する。本体出力処理は、ステップS238,S243において、自身である本体出力処理を呼び出しており、再帰的な処理となっている。図19のステップS203~S205のループにおいて、本体出力処理は、レコード243に対応する「postAuth」と、レコード244に対応する「for」との2回実行されるが、自身を呼び出すことで、さらに多くの本体出力処理が実行される。
 ステップS231において、ソースコード生成部118は、処理種別234(図6参照)が「API実行」(卸サービスAPIの呼出し)ならば(ステップS231→API実行)ステップS232に進み、処理種別234が「制御」で処理235が「for」ならば(ステップS231→for)ステップS235に進み、処理種別234が「制御」で処理235が「if」ならば(ステップS231→if)ステップS241に進む。
 ステップS232において、ソースコード生成部118は、要求パラメータをセットするコードを出力する。詳しくは、ソースコード生成部118は、APIパラメータデータベース250(図7参照)に含まれる、呼び出される卸サービスAPIに対応するレコードを参照して、アダプタ化APIの要求パラメータを卸サービスAPIの要求パラメータにセットするソースコードを生成する。
 以下では、レコード243の「postAuth」に対して本体出力処理が呼ばれた場合を例に説明する。ソースコード生成部118は、APIパラメータデータベース250(図7参照)のなかで、処理253がレコード243の処理235の「postAuth」と実行順序233の「1」とを含み、パラメータ種別254が「要求」であるレコードを検索する。次に、ソースコード生成部118は、検索結果のレコードのオブジェクト255を生成するコードと、検索結果のレコードに含まれるオブジェクト255のパラメータ256に入力元/反映先257をセットするコードとを出力する。レコード243の「postAuth」の場合では、レコード261が検索されて、オブジェクトを生成するソースコード290の行5と、パラメータをセットする行6が出力される。ソースコード290の行7についても、レコード261と同様に検索されて出力される。オブジェクトを生成するコードが出力済みならば、オブジェクトを生成するコードは出力されない。
 ステップS233において、ソースコード生成部118は、卸サービスAPIを呼び出すコードを出力する。レコード243の「postAuth」においては、ソースコード生成部118は、ソースコード290の行9を出力する。
 ステップS234において、ソースコード生成部118は、応答パラメータをセットするコードを出力する。詳しくは、ソースコード生成部118は、APIパラメータデータベース250に含まれる、呼び出される卸サービスAPIに対応するレコードを参照して、卸サービスAPIの応答パラメータをアダプタ化APIの応答パラメータにセットするソースコードを生成する。
 以下では、レコード243の「postAuth」に対して本体出力処理が呼ばれた場合を例に説明する。ソースコード生成部118は、APIパラメータデータベース250(図7参照)のなかで、処理253がレコード243の処理235の「postAuth」と実行順序233の「1」とを含み、パラメータ種別254が「応答」であるレコードを検索する。次に、ソースコード生成部118は、検索結果のレコードのオブジェクト255を取得するコードと、入力元/反映先257のパラメータに、パラメータ256をセットするコードとを出力する。レコード243の「postAuth」の場合では、レコード263が検索されて、オブジェクト255のAuthResponseを取得するソースコードの行11と、入力元/反映先257のパラメータ「internalData.apiToken」に、パラメータ256の「apiToken」をセットする行12が出力される。
 ステップS235において、ソースコード生成部118は、繰返し制御変数を生成する。詳しくは、ソースコード生成部118は、付加情報236にある繰返し変数の制御変数を生成する。
 以下では、レコード244の「for」に対して本体出力処理が呼ばれた場合を例に説明する。レコード244の付加情報236にある繰返し変数は、「productOrder.characteristic.network」であり、配列の変数である。このため、ソースコード生成部118は、配列のインデックスを表す制御変数として整数の変数である「i」を生成する。
 ステップS236において、ソースコード生成部118は、for行を出力する。詳しくは、ソースコード生成部118は、生成した制御変数と、付加情報236にある繰返し変数を含むfor行を出力する。
 以下では、レコード244の「for」に対して本体出力処理が呼ばれたときを例に説明する。ソースコード生成部118は、制御変数の初期値は0であり、制御変数を1ずつ増やしながら、繰返し変数「productOrder.characteristic.network」の配列の長さである「productOrder.characteristic.network.length」まで繰り返すことを示す、ソースコード290の行14を出力する。
 ステップS237~239において、ソースコード生成部118は、「for」に含まれる処理ごとに、ステップS238の本体出力処理を繰り返す。レコード244の「for」に含まれる処理は、レコード245の「if」の処理のみである。レコード246は、レコード245の「if」に含まれる処理であり、レコード247は、レコード245の「if」の終了である。よって、ソースコード生成部118は、レコード245の処理に対する本体出力処理を実行する。この処理については、ステップS241~S245で詳しく説明する。なお、この処理で、ソースコード290の行15~行25が出力される。
 ステップS240において、ソースコード生成部118は、終了行を出力する。レコード244の「for」では、ソースコード290の行26を出力する。
 ステップS241において、ソースコード生成部118は、実行条件を含むif行を出力する。以下では、レコード245の「if」に対して本体出力処理が呼ばれたときを例に説明する。レコード245の「if」の実行条件は、付加情報236に示される「productOrder.characteristic.network.enable == true」であり、ソースコード生成部118は、この実行条件を含むソースコード290の行15を出力する。なお、実行条件に含まれる「productOrder.characteristic.network」は配列であり、行14で出力された制御変数の「i」を含めて、行15は出力される。
 ステップS242~S244において、ソースコード生成部118は、「if」に含まれる処理ごとに、ステップS243の本体出力処理を繰り返す。レコード245の「if」に含まれる処理は、レコード246の「postNetwork」の処理のみである。よって、ソースコード生成部118は、レコード246の処理に対する本体出力処理を実行する。この処理については、ステップS232~S234で説明した際の「postAuth」と同様の処理であり、ソースコード290の行16~行24が出力される。
 ステップS245において、ソースコード生成部118は、終了行を出力する。レコード245の「if」では、ソースコード290の行25を出力する。
≪APIアダプタ作成装置の特徴≫
 開発担当者は、アダプタ化APIが呼び出す卸サービスAPIの順序や実行条件、繰返し条件を規定して、アダプタ化APIの要求・応答パラメータと、卸サービスAPIの要求・応答パラメータとの関係を規定することで、APIアダプタを開発することができる。開発担当者は、ソースコードを記述する必要がなく、ロジックの検討に集中することができるので、開発期間が短くなり、新しい卸サービスや仕様変更にも短期間で対応可能となる。
 上記した実行順序やパラメータ関係の規定が設計情報であり、設計情報である仕様書を作成する必要がなくなる。また、設計情報またはソースコードを変更したときに、他方を修正する必要もなくなる。設計情報と実装(ソースコード)との不整合も発生しない。
100 APIアダプタ作成装置
110 制御部
111 卸サービスAPI仕様参照部
112 API実行順序設定部
113 API実行条件設定部
114 API繰返し実行設定部
115 API要求パラメータ取得元設定部
116 API応答パラメータ反映先設定部
117 API要求応答パラメータ設計支援部
118 ソースコード生成部
119 アダプタ生成部
120 記憶部

Claims (6)

  1.  複数の卸サービスを組み合わせた連携サービスを構築する複数サービス連携実行装置に備わる、前記卸サービスのAPI(Application Program Interface)アダプタが提供するアダプタ化APIを作成するAPIアダプタ作成装置であって、
     前記アダプタ化APIの内部処理が呼び出す前記卸サービスのAPIを示す卸サービスAPIの実行順序の設定を受け付けるAPI実行順序設定部と、
     前記卸サービスAPIの要求パラメータの取得元となる前記アダプタ化APIの要求パラメータの設定を受け付けるAPI要求パラメータ取得元設定部と、
     前記卸サービスAPIの応答パラメータの反映先となる前記アダプタ化APIの応答パラメータの設定を受け付けるAPI応答パラメータ反映先設定部と、
     前記実行順序の設定と、前記取得元の設定と、前記反映先の設定に基づいて、前記アダプタ化APIのソースコードを生成するソースコード生成部と、
     を備えることを特徴とするAPIアダプタ作成装置。
  2.  前記卸サービスAPIの実行の実行条件の設定を受け付けるAPI実行条件設定部を、さらに備え、
     前記ソースコード生成部は、前記実行条件の設定の内容を含む、前記アダプタ化APIのソースコードを生成する
     ことを特徴とする請求項1に記載のAPIアダプタ作成装置。
  3.  前記卸サービスAPIの繰返し実行の繰返し条件の設定を受け付けるAPI繰返し条件設定部を、さらに備え、
     前記ソースコード生成部は、前記繰返し条件の設定の内容を含む、前記アダプタ化APIのソースコードを生成する
     ことを特徴とする請求項1に記載のAPIアダプタ作成装置。
  4.  前記卸サービスAPIの要求パラメータの指定を受け付けると、当該要求パラメータと同じ名称の前記アダプタ化APIの要求パラメータを取得元と設定し、前記卸サービスAPIの応答パラメータの指定を受け付けると、当該応答パラメータと同じ名称の前記アダプタ化APIの応答パラメータを反映先と設定するAPI要求応答パラメータ設計支援部を、さらに備え、
     前記ソースコード生成部は、前記API要求応答パラメータ設計支援部が設定した前記取得元および反映先の設定の内容を含む、前記アダプタ化APIのソースコードを生成する
     ことを特徴とする請求項1~3のいずれか1項に記載のAPIアダプタ作成装置。
  5.  複数の卸サービスを組み合わせた連携サービスを構築する複数サービス連携実行装置に備わる、前記卸サービスのAPIアダプタが提供するアダプタ化APIを作成するAPIアダプタ作成装置のAPIアダプタ作成方法であって、
     前記アダプタ化APIの内部処理が呼び出す前記卸サービスのAPIを示す卸サービスAPIの実行順序の設定を受け付けるステップと、
     前記卸サービスAPIの要求パラメータの取得元となる前記アダプタ化APIの要求パラメータの設定を受け付けるステップと、
     前記卸サービスAPIの応答パラメータの反映先となる前記アダプタ化APIの応答パラメータの設定を受け付けるステップと、
     前記実行順序の設定と、前記取得元の設定と、前記反映先の設定に基づいて、前記アダプタ化APIのソースコードを生成するステップと、
     を実行することを特徴とするAPIアダプタ作成方法。
  6.  コンピュータを請求項1~4のいずれか1項に記載のAPIアダプタ作成装置として機能させるためのAPIアダプタ作成プログラム。
PCT/JP2019/027797 2018-08-02 2019-07-12 Apiアダプタ作成装置、apiアダプタ作成方法およびapiアダプタ作成プログラム WO2020026778A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/264,589 US11487595B2 (en) 2018-08-02 2019-07-12 API adapter creation device, API adapter creation method, and API adapter creation program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-146236 2018-08-02
JP2018146236A JP7003867B2 (ja) 2018-08-02 2018-08-02 Apiアダプタ作成装置、apiアダプタ作成方法およびapiアダプタ作成プログラム

Publications (1)

Publication Number Publication Date
WO2020026778A1 true WO2020026778A1 (ja) 2020-02-06

Family

ID=69230769

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/027797 WO2020026778A1 (ja) 2018-08-02 2019-07-12 Apiアダプタ作成装置、apiアダプタ作成方法およびapiアダプタ作成プログラム

Country Status (3)

Country Link
US (1) US11487595B2 (ja)
JP (1) JP7003867B2 (ja)
WO (1) WO2020026778A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021161500A1 (ja) * 2020-02-14 2021-08-19
WO2022215194A1 (ja) * 2021-04-07 2022-10-13 日本電信電話株式会社 Apiアダプタ生成装置及びapiアダプタ生成方法並びにapiアダプタ生成プログラム

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11507351B2 (en) * 2020-05-12 2022-11-22 Vmware, Inc. Intent compiler
US11740894B2 (en) * 2022-01-25 2023-08-29 Sap Se Build-independent software framework for creating custom adapters
US11989558B2 (en) * 2022-02-24 2024-05-21 Sap Se Automatic generation of a cloud integration adapter from a standard, programming language-agnostic interface specification

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012073778A (ja) * 2010-09-28 2012-04-12 Yahoo Japan Corp WebAPI作成支援装置及びWebAPI作成支援方法
JP2018005824A (ja) * 2016-07-08 2018-01-11 ソフトバンク株式会社 情報処理装置及びプログラム
JP2018032897A (ja) * 2016-08-22 2018-03-01 日本電信電話株式会社 事業者間一括サービス構築装置及び事業者間一括サービス構築方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009238040A (ja) 2008-03-27 2009-10-15 Hitachi Ltd モジュール間連携支援方法、モジュール間連携支援プログラム、モジュール間連携支援システム
US20110088011A1 (en) * 2009-10-14 2011-04-14 Vermeg Sarl Automated Enterprise Software Development
US20140006257A1 (en) * 2012-06-28 2014-01-02 Martin Von Der Emde Consistent Interface for Payment Order, Payment Order Processing Statement and Product Valuation Data
US20140006239A1 (en) * 2012-06-28 2014-01-02 Simon Dieterich Consistent Interface for Service Confirmation
JP6169662B2 (ja) * 2015-09-11 2017-07-26 西日本電信電話株式会社 Api変換アダプタ、api変換システム、及びapi変換プログラム
JP6795531B2 (ja) * 2018-02-20 2020-12-02 日本電信電話株式会社 Apiアダプタ、apiアダプタ作成方法、およびプログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012073778A (ja) * 2010-09-28 2012-04-12 Yahoo Japan Corp WebAPI作成支援装置及びWebAPI作成支援方法
JP2018005824A (ja) * 2016-07-08 2018-01-11 ソフトバンク株式会社 情報処理装置及びプログラム
JP2018032897A (ja) * 2016-08-22 2018-03-01 日本電信電話株式会社 事業者間一括サービス構築装置及び事業者間一括サービス構築方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAKAHASHI, KENSUKE ET AL.: "An Orchestrator that realizes Coordination Fulfillment among Multiple Service Providers", IEICE TECHNICAL REPORT, vol. 117, no. 491, 1 March 2018 (2018-03-01), pages 91 - 96 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021161500A1 (ja) * 2020-02-14 2021-08-19
WO2021161500A1 (ja) * 2020-02-14 2021-08-19 日本電信電話株式会社 Apiアダプタ試験支援システム、apiアダプタ試験支援装置、apiアダプタ試験支援方法、および、apiアダプタ試験支援プログラム
JP7360073B2 (ja) 2020-02-14 2023-10-12 日本電信電話株式会社 Apiアダプタ試験支援システム、apiアダプタ試験支援装置、apiアダプタ試験支援方法、および、apiアダプタ試験支援プログラム
WO2022215194A1 (ja) * 2021-04-07 2022-10-13 日本電信電話株式会社 Apiアダプタ生成装置及びapiアダプタ生成方法並びにapiアダプタ生成プログラム

Also Published As

Publication number Publication date
JP2020021374A (ja) 2020-02-06
JP7003867B2 (ja) 2022-01-21
US20210334149A1 (en) 2021-10-28
US11487595B2 (en) 2022-11-01

Similar Documents

Publication Publication Date Title
WO2020026778A1 (ja) Apiアダプタ作成装置、apiアダプタ作成方法およびapiアダプタ作成プログラム
US10402483B2 (en) Screenshot processing device and method for same
CN106682219B (zh) 关联文档获取方法及装置
JP6591458B2 (ja) Restサービスソースコード生成
CN114115852A (zh) 可视化服务编排方法、装置、设备及介质
CN106844453B (zh) 一种电子文件格式转换方法
WO2018036342A1 (zh) 基于csar的模型文件的可视化设计方法及装置
JP2006260540A (ja) データバインドされたリッチなアプリケーション
US10572546B2 (en) Information processing apparatus, document display method, document display system, and medium
US20100082701A1 (en) System and Method for Using a Configuration Management Database
CN110674083B (zh) 工作流迁移方法、装置、设备及计算机可读存储介质
CN106062741B (zh) 在社交网络系统中进行信息处理的方法和系统
JP7076471B2 (ja) 即時通信アプリケーションにおけるファイル送信
US20190102465A1 (en) Api query extension
JP6332533B2 (ja) 情報処理装置、その処理方法及びプログラム
JP2010016778A (ja) 画像形成装置、情報処理方法、及び、画像形成システム
WO2022000888A1 (zh) 执行定制化人工智能生产线的装置和方法、设备和介质
US20130304717A1 (en) Control system asset management
CN113268955A (zh) 报文转换的方法和装置
US20160092455A1 (en) Building queries directed to objects hosted on clouds
CN113568614A (zh) 任务发布方法、电子设备及存储介质
CN116708558B (zh) 全链路追踪系统代理方法、装置、计算机设备及存储介质
CN112947912A (zh) 生成代码的方法、装置、电子设备和存储介质
US20190213003A1 (en) Method, system and software application for developing mobile applications
CN111001157A (zh) 引用信息的生成方法和装置、存储介质及电子装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19843415

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19843415

Country of ref document: EP

Kind code of ref document: A1