6.14.1 HTTP-adapter runtime-environment property file
- Organization of this subsection
(1) Format
[adphttp.request.method={GET|HEAD|POST|OPTIONS|PUT|DELETE}]
[adphttp.request.uri-scheme-authority=URI-scheme-and-authority]
[adphttp.request.uri-path=URI-path]
[adphttp.request.uri-query.serial-number=URI-query]
[adphttp.request.header.authorization.type={none|raw}]
[adphttp.request.header.authorization=authentication-information]
[adphttp.request.header.content-type.charset=character-encoding-of-Content-Type-header]
[adphttp.request.header.content-type=media-type-of-Content-Type-header]
[adphttp.request.header.userdef.serial-number=request-header]
[adphttp.request.part.message.binding={none|raw|form-data}]
[adphttp.request.part.file.serial-number.input-folder-name=common-folder-definition-name]
[adphttp.request.part.file.serial-number.local-file-name=name-of-file-to-be-read]
[adphttp.request.output-folder-name=common-folder-definition-name]
[adphttp.request.output-sub-folder=name-of-file-output-destination-subfolder]
[adphttp.config.trace.path=directory-to-output-log]
[adphttp.config.messagelog.level={0|10|20}]
[adphttp.config.methodtrace.level={1|2|3|4|5}]
[adphttp.config.methodtrace.filenum=number-of-method-trace-files]
[adphttp.config.methodtrace.filesize=size-of-method-trace-files]
[adphttp.config.exptrace.filenum=number-of-exception-log-files]
[adphttp.config.exptrace.filesize=size-of-exception-log-files]
[adphttp.config.password-auth-inf-filepath=path-of-password-authentication-information-definition-file]
[adphttp.config.publickey-auth-inf-filepath=path-of-public-key-authentication-information-definition-file]
(2) Function
Specifies the configuration information for each HTTP adapter.
For details on the priority order when the same elements are specified in the request message (header), the HTTP-adapter runtime-environment property file, and HTTP-adapter runtime-environment common property file, see 2.14.12 Mapping of parameters in the request message (header) and the HTTP-adapter runtime-environment (common) property file in the manual Service Platform Overview.
To create the HTTP-adapter runtime-environment property file:
-
Define the HTTP-adapter runtime-environment property file based on the following template file:
Service-platform-installation-directory\CSC\custom-adapter\HTTP\config\templates\serviceid.properties
-
Rename the edited HTTP-adapter runtime-environment property file as service-ID.properties, and store the file in the following directory:
Service-platform-installation-directory\CSC\custom-adapter\HTTP\config
(3) Specifiable properties
(a) Request line
adphttp.request.method={GET|HEAD|POST|OPTIONS|PUT|DELETE}
Specifies the name of the HTTP method for the request.
If you specify a method name other than GET, HEAD, POST, OPTIONS, PUT, and DELETE, the operations are not guaranteed.
adphttp.request.uri-scheme-authority=URI-scheme-and-authority
Specifies the URI scheme and the authority in the format scheme://authority.
adphttp.request.uri-path=URI-path
Specifies a portion of the URI path. If the URI path is the root path ("/"), you can omit the path.
adphttp.request.uri-query.serial-number=URI-query
Specifies URI queries one by one, in the format key=value.
You can specify a number from 1 to 1024 in serial-number.
(b) WWW authentication
adphttp.request.header.authorization.type={none|raw} ~ <<none>>
Specifies the WWW authentication type. The characters are not case sensitive.
-
none
The authentication information is not sent.
-
raw
The authentication information is set in Authorization of the HTTP request header and sent.
When you specify this property, make sure that you specify the authentication information in the adphttp.request.header.authorization property.
adphttp.request.header.authorization=authentication-information
Specifies the WWW authentication information as follows:
-
If none is specified in the property adphttp.request.header.authorization.type
Remove the comments (specify an empty string).
-
If raw is specified in the property adphttp.request.header.authorization.type
Specify any authentication information.
(c) Content-Type header of HTTP headers
adphttp.request.header.content-type.charset=character-encoding-of-Content-Type-header
Specifies the character encoding of the Content-Type header for the HTTP request header.
If form-data is specified in the binding method of the request message (body), an HTTP request is sent after transforming the form data to the character encoding specified in this property. You can specify only the character encoding that can be used in JavaVM.
If raw is specified in the binding method of the request message (body), specify a character encoding suitable to the character encoding in the request message (body).
If the adphttp.request.header.content-type property is not specified, this property is ignored. An error occurs if you specify only the key and not the value.
adphttp.request.header.content-type=media-type-of-Content-Type-header
Specifies the media type of the Content-Type header for the HTTP request header in the format */*. An error occurs if you specify only the key and not the value.
(d) Optional specifications of the HTTP header
adphttp.request.header.userdef.serial-number=request-header
Specifies any request-header (one header) in the format field-name:field-value. You can specify a number from 1 to 1024 in serial-number.
We recommend extended header settings for this property. The operations might not function normally if you define a standard header. Also, a special HTTP header is ignored even if specified. For details, see the description about the HTTP request header in 2.14.3 Relation between HTTP requests and request messages in the manual Service Platform Overview.
The specified value is divided into field-name and field-value considering the first colon (:) as a delimiter and then set in the HTTP header. Even if field-name and field-value contain extra null characters, the characters are not removed.
Do not specify linefeed characters in field-name and field-value. An error occurs if linefeed characters are included.
(e) Request message (body)
adphttp.request.part.message.binding={none|raw|form-data} ~ <<none>>
Specifies the binding method of the request message (body) to the HTTP request body. The characters are not case sensitive.
-
none
The HTTP request body will not be sent.
-
raw
The pass-through mode is used, and the data specified in the request message (body) is set in the HTTP request body as is.
-
form-data
The normal mode is used, and the form data in the request message (body) is set in the HTTP request body in the format Content-Type: application/x-www-form-urlencoded.
When using an authentication flow supported by OAuth 2.0, specify form-data to send authentication information as the form data.
(f) Input file
adphttp.request.part.file.serial-number.input-folder-name=common-folder-definition-name
Specifies the definition name of the common folder where the file to be read is stored. You can specify only 1 in serial-number.
If the specified common folder definition name is invalid, an error occurs. An error also occurs if you specify only the key and not the value. You can omit this property if you do not use the common folder.
When you specify this property, make sure that you specify the name of the file to be read in the adphttp.request.part.file.serial-number.local-file-name property.
adphttp.request.part.file.serial-number.local-file-name=name-of-file-to-be-read
Specifies the name of the file to be read. You can specify only 1 in serial-number.
If you specify a hierarchical structure or a higher path, an error occurs. If you use a subfolder, specify the relative path from the common folder root to the file name. An error also occurs if you specify only the key and not the value.
When you specify this property, make sure that you specify the common folder definition name in the adphttp.request.part.file.serial-number.input-folder-name property.
Specify a file other than a symbolic link.
(g) Output files
adphttp.request.output-folder-name=common-folder-definition-name
Specifies the definition name of the common folder where the file to be written to is stored.
If the specified common folder definition name is invalid, an error occurs. An error also occurs if you specify only the key and not the value.
You can omit this property if you do not use the common folder.
adphttp.request.output-sub-folder=name-of-file-output-destination-subfolder
Specifies the subfolder to which download files are output during HTTP response.
If you specify the common folder for the adphttp.request.output-folder-name property and use a subfolder, specify the subfolder to which write-target files are to be output.
Specify the relative path from the common folder root to the subfolder. You can omit the file separator (/) at the beginning or end of a relative path.
If the specified subfolder does not exist, a folder is created when the command is executed.
If you specify a path higher than the common folder root, an error occurs.
If a common folder definition name is not defined for the adphttp.request.output-folder-name property, the value specified in this property is ignored.
(h) Logging
adphttp.config.trace.path=directory-to-output-log~ <<log-output-directory-specified-in-the-key-ejb.server.log.directory-of-the-option-definition-file-for-J2EE-servers- (usrconf.properties)\CSCADP\ADPHTTP\maintenance\service-ID>>
Specifies an absolute path for the directory to output the maintenance and exception logs. If the specified folder does not exist, a folder is created when the HTTP adapter starts.
adphttp.config.messagelog.level={0|10|20} ~ <<10>>
Specifies the output levels for the message log. The following table lists the output information and the output levels:
|
Output information |
Description |
Output level |
||
|---|---|---|---|---|
|
0 |
10 |
20 |
||
|
Error information |
Cause of an exception or an error |
Y |
Y |
Y |
|
Warning information |
Information such as the problem that occurred |
O |
Y |
Y |
|
Information |
Content of the messages and arguments Changes in the HTTP adapter status (starting and stopping) Event notification |
O |
O |
Y |
- Legend:
-
Y: Information is output.
O: Only important log messages are output.
adphttp.config.methodtrace.level={1|2|3|4|5} ~ <<3>>
Specifies the output levels for the maintenance log. The following table lists the output information and the output levels:
|
Output information |
Output level |
||||
|---|---|---|---|---|---|
|
1 |
2 |
3 |
4 |
5 |
|
|
Error information (cause of exception) |
Y |
Y |
Y |
Y |
Y |
|
Entrance and exit information for the interfaces of the main external modules (class name, method name, argument, return value) |
N |
Y |
Y |
Y |
Y |
|
Entrance and exit information for the interfaces of the external modules (class name, method name, argument, return value) |
N |
N |
Y |
Y |
Y |
|
Entrance and exit information for the interfaces within the main components (class name, method name, argument, return value) |
N |
N |
N |
Y |
Y |
|
Entrance and exit information for the interfaces within the components (class name, method name, argument, return value), and debug information (information such as the branching of processing) |
N |
N |
N |
N |
Y |
- Legend:
-
Y: Information is output.
N: Information is not output.
adphttp.config.methodtrace.filenum=number-of-method-trace-files ~ <Numeric character> ((1 to 16)) <<8>>
Specifies the number of maintenance log files.
adphttp.config.methodtrace.filesize=size-of-method-trace-files ~ <Numeric character> ((4096 to 2147483647)) <<2097152>>
Specifies the maximum size of one maintenance log file in bytes.
adphttp.config.exptrace.filenum=number-of-exception-log-files ~ <Numeric character> ((1 to 16)) <<8>>
Specifies the number of exception log files.
adphttp.config.exptrace.filesize=size-of-exception-log-files ~ <Numeric character> ((4096 to 2147483647)) <<2097152>>
Specifies the maximum size of one exception log file in bytes.
(i) Password authentication information definition file
adphttp.config.password-auth-inf-filepath=path-of-password-authentication-information-definition-file
Specifies the name of the password authentication information definition file as an absolute path if the user information for password authentication has been registered by using the csauseradd command. Specify the path of the password authentication information definition file that was specified for the -f option when the csauseradd command was executed.
The file to be specified requires access permissions of the administrator of the HCSC server.
If the specified file does not exist, an error occurs when the service adapter starts.
(j) Public key authentication information definition file
adphttp.config.publickey-auth-inf-filepath=path-of-public-key-authentication-information-definition-file
Specifies the name of the public key authentication information definition file as an absolute path if private key information for public key authentication has been registered by using the csakeyadd command. Specify the path of the public key authentication information definition file that was specified for the -f option when the csakeyadd command was executed.
The file to be specified requires access permissions of the administrator of the HCSC server.
If the specified file does not exist, an error occurs when the service adapter starts.
(4) Example of coding
An example of coding is as follows:
adphttp.request.method=GET adphttp.request.uri-scheme-authority=http://localhost:80 adphttp.request.uri-path=trans/EN2JP/something adphttp.request.uri-query.1=name=id adphttp.request.header.authorization.type=none adphttp.request.header.authorization= adphttp.request.header.content-type.charset=utf-8 adphttp.request.header.content-type=application/msword adphttp.request.header.userdef.1=cache-control:no-cache adphttp.request.part.message.binding=none adphttp.config.messagelog.level=10 adphttp.config.methodtrace.level=3 adphttp.config.methodtrace.filenum=8 adphttp.config.methodtrace.filesize=2097152 adphttp.config.exptrace.filenum=8 adphttp.config.exptrace.filesize=2097152
(5) Notes
-
Set the character encoding of the property file to UTF-8 and then store the file. If you use a character encoding other than UTF-8, the set value might not be interpreted correctly.
-
Note the following when you specify the path:
-
Do not specify a path that contains characters expressing a relative path or a parent directory (..\ or ../) or characters expressing a current directory (.\ or ./).
-
Do not specify a path containing a symbolic link.
-
In Windows, do not specify a path containing a UNC format, an NTFS stream name, or a reserved device name. The path characters are not case sensitive.
-