uCosminexus Service Platform, Overview

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

2.13.7 Encoding and decoding HTTP requests and HTTP responses

This section describes encoding and decoding of HTTP request and HTTP response.

The character codes used during HTTP request, HTTP response and system exceptions are described here.

In HTTP request
You can specify character codes to decode the query character string and message body using the following methods:
  • Method to specify by charset attribute of Content-Type header of HTTP request header
  • Method to specify by httprecp.http.charset property of HTTP reception definition file
If both HTTP request header and HTTP reception definition file are specified, specification of HTTP request header is prioritized.

In HTTP response/in system exception
For character codes used in message body encoding, see "2.13.5(2)(a) Content-Type and charset".

Note
  • The same character codes are used to decode URL and message body.
  • For response message (body) data used as text data, the character code set in encoding attribute of XML declaration tag is the same as the character code set in HTTP response body and HTTP response header.
  • User needs URL encoding for HTTP header value in the following cases:
    [Figure]To send HTTP request header containing Japanese from HTTP client to HTTP reception
    [Figure]If the response message (header) contains Japanese HTTP response header
    [Figure]If the value of HTTP response header definition file contains Japanese HTTP response header
  • HTTP header value is not encoded and decoded when HTTP reception passes HTTP request from HTTP client to the business process. HTTP header value is also not encoded and decoded when the response is returned from the business process to HTTP client.
  • In pass-through mode, always specify "UTF-8" in the encoding attribute of XML declaration tag of the request message to be sent.
  • While transforming a request message in binary format or optional format (any format) generated from binary data to XML format message, you must use data transformation activity for decoding.