uCosminexus Service Platform, Overview

[Contents][Glossary][Index][Back][Next]

2.13.2 Example of online system using HTTP reception

This section is an introduction to HTTP reception usage method providing examples of systems handling text data, files and binary data.

Organization of this subsection
(1) System in which text data is sent and received
(2) System in which files are sent and received
(3) System in which binary data is sent and received

(1) System in which text data is sent and received

This section describes examples of systems buying products online from Web browser of the tablet terminal.

Web browser used in this example is configured from [Login screen] to authenticate user information, [Input screen] to enter information such as the products to be bought and [Results screen] to display buying results. If a user buys a product, send a request from Web browser as per the following flow:

  1. Send GET method request and acquire the list of products.
  2. Send POST method request, send the products selected from the list and invoke the buy process.

The relation between each request process and HTTP reception is described here.

(a) Example of sending GET method request

In this request example, after the information entered in Web browser is sent to the service platform as GET method request, the screen generated on the basis of the corresponding HTTP response data is executed by the process displayed in Web browser.

The flow of sending GET method request is described here. The following numbers correspond to the numbers in the figure:

  1. Information entered by the user in [Login screen] of Web browser is sent to Web server.
  2. HTTP request is passed from Web server to HTTP reception.
  3. HTTP header and HTTP body are transformed to request message (header) and request message (body) respectively in HTTP reception. Transformed data is passed to the business process in the service platform and various services such as product database are invoked from the business process. After that, the response message is transformed to HTTP response format in HTTP reception.
  4. Response message in XML format is set in HTTP body of HTTP response.
  5. HTML is created (using JavaScript or through front end server) on the basis of response message contents and it is displayed at client side. In this example, acquired data is added in the selection list of [Input screen].

    Figure 2-71 Example of system using HTTP reception (if GET method request is sent)

    [Figure]

(b) Example of sending POST method request

In this request example, after the information entered in Web browser is sent to the service platform as POST method request, the screen generated on the basis of the corresponding HTTP response data is executed by the process displayed in Web browser.

The flow of sending POST method request is described here. The following numbers correspond to the numbers in the figure:

  1. Data entered by the user in [Input screen] in Web browser is sent to Web server.
  2. HTTP request is passed from Web server to HTTP reception.
  3. Similar to the case in which GET method request is sent, HTTP header and HTTP body are transformed to request message (header) and request message (body) respectively in HTTP reception and various services are invoked through the business process. After that, the response message is transformed to HTTP response format in HTTP reception.
  4. Response message in XML format is set in HTTP body of HTTP response.
  5. HTML is created (using JavaScript or through front end server) on the basis of response message contents and it is displayed at client side. In this example, [Results screen] showing that the product buying process is complete is displayed.

    Figure 2-72 Example of system using HTTP reception (if POST method request is sent)

    [Figure]

(2) System in which files are sent and received

The following examples describe the system that sends and receives data between HTTP client, service platform, and servers using the file transfer functionality of HTTP reception.

(a) Example of sending files from HTTP client to server

In this request, the process is executed to send files uploaded using POST method from HTTP client to the destination server from HTTP adapter invoked through a business process.

The flow of sending files from HTTP client to the server is as follows. The following numbers correspond to the numbers in the figure:

  1. Send HTTP request by POST method from HTTP client program.
  2. HTTP reception analyses the received HTTP request and creates a working folder to process files. Uploaded files are generated in the working folder as intermediate files.
  3. Specify information of destination server and sent data (intermediate file saved in the working folder by HTTP reception) in HTTP adapter request message using data transformation activity in a business process.
  4. HTTP adapter invoked from a business process sends a file from the working folder to the destination server.

    Figure 2-73 Example of system using HTTP reception (while sending files from HTTP client to server)

    [Figure]

For HTTP adapter functionality, see "2.14 Connecting to services using HTTP communication".

(b) Example of transforming files sent from HTTP client

In this request, files uploaded using POST method from HTTP client are transformed by the file operations adapter invoked through the business process and the process is then executed to download the files in HTTP client.

The flow of sending files using HTTP reception is as follows. The following numbers correspond to the numbers in the figure:

  1. Send HTTP request using POST method from HTTP client program.
  2. HTTP reception analyses the received HTTP request and creates a working folder to process files. The uploaded file is generated in the working folder as intermediate file A.
  3. The file operations adapter invoked from the business process transforms the intermediate file A in the working folder to intermediate file B.
  4. HTTP reception downloads the intermediate file B after transformation in HTTP client.

    Figure 2-74 Example of system using HTTP reception (while transforming files sent from HTTP client)

    [Figure]

(3) System in which binary data is sent and received

In this request, a process is executed to send the binary data in which CSV format files are transformed to a business process from an HTTP client, as an example of processing binary data in a business process.

The flow of sending binary data from an HTTP client to a business process is described here. The following numbers correspond to the numbers in the figure:

  1. CSV format files in HTTP client programs are transformed to binary data and this data is set in HTTP request body.
  2. Send HTTP request using POST method from HTTP client program.
  3. HTTP reception analyses the received HTTP request and invokes a business process.
  4. Transform binary data set in the request message using the data transformation activity in the business process to XML data (XML message).
  5. Use the invoke service activity and send XML data (XML message) to each service.
  6. HTTP reception returns HTTP response to HTTP client.

    Figure 2-75 Example of system using HTTP reception (while sending binary data from an HTTP client to a business process)

    [Figure]