2.14.12 Examples of a system using the HTTP adapter
(1) Uploading a file sent from an HTTP client to the server
In this example, a file sent from the HTTP client is converted by the file operations adapter, and then uploaded to the target server.
Figure 2-98 Example of a system using the HTTP adapter (1)
![[Figure]](figure/zc500403.gif)
The figure below shows the flow of service component invocation and the flow of a file. The following numbers correspond to numbers in the figure.
- The service requester (REST client program of the HTTP client) sends a file to the HCSC server.
- The file received by HTTP reception is generated as an intermediate file in the work folder.
- The file operations adapter invoked from the business process converts the intermediate file.
- The HTTP adapter invoked from the business process sends the converted file to the target server.
(2) Moving a file saved on a server to another server
In this example, a file saved on a server is downloaded to the HCSC server, and then sent to another (target) server.
Figure 2-99 Example of a system using the HTTP adapter (2)
![[Figure]](figure/zc500404.gif)
The figure below the flow of service component invocation and the flow of a file. The following numbers correspond to the numbers in the figure.
- The service requester (client program) sends a request for executing the business process.
- HTTP adapter A invoked from the business process accesses the target server (application server A) and receives the file, and then saves the file in the common folder.
- HTTP adapter B invoked from the business process sends the file saved in the common folder to the target server (application server B).
- The file operations adapter deletes the received file from the common folder.