Hitachi

uCosminexus Service Platform Reference Guide


3.11.3 HTTP reception definition file

Organization of this subsection

(1) Format

[urecp-http.context-root=Context root of HTTP reception]
[urecp-http.max-threads=Max. threads in HTTP reception]
[urecp-http.exclusive-threads=Number of HTTP reception occupied execution threads]
[urecp-http.queue-size=Size of pending queue in HTTP reception]
[urecp-http.pooled-instance.minimum=Minimum number of instances in the pool of HTTP reception]
[urecp-http.pooled-instance.maximum=Maximum number of instances in the pool of HTTP reception]
[urecp-http.ejb-transaction-timeout= EJB transaction timeout time of HTTP reception
 
[httprecp.switchover.pass-through.mode={true|false}]
[httprecp.switchover.file-transfer.mode={true|false}]
[httprecp.http.charset={Shift_JIS|UTF-8}]
[httprecp.response.ignore-bodymsg={true|false}]
[httprecp.response.header.filename=HTTP response header definition file name]
[httprecp.system-exception.status-code=Status code when there is a system exception]
[httprecp.response.generate.content-length={true|false}]
[httprecp.file-trans.temp-file.partsize-threshold=Threshold value size to output temporary files]
[httprecp.file-trans.maxsize.part=Size limit for 1 file of the file data that can be received]
[httprecp.file-trans.maxsize.requestSize limit for HTTP request body that can be received]
[httprecp.work-dir.auto-delete={true|false}]
[httprecp.response.download.disposition-type=Value to be set in Content-Disposition header of HTTP response header
[httprecp.pass-through.parameter-use={true|false}]
 
[httprecp.request.switchover.json-transfer.mode={true|false}]
[httprecp.response.switchover.json-transfer.mode={true|false}]
 
[httprecp.response.compression.url-patternURL-pattern-identification-number=URL-pattern-of-request-URL]
[httprecp.response.compression.rulecompression-rule-identification-number.url-mappingURL-mapping-identification-number=URL-pattern-of-HTTP-response-compression-rule]
[httprecp.response.compression.rulecompression-rule-identification-number.conditioncompression-condition-identification-number=media-type:compression-threshold]

(2) Function

Specify the operating information of HTTP reception. The contents that you specify in HTTP reception definition file become effective when HTTP reception starts.

Create HTTP reception definition file with the file name "cscurecphttp.properties".

(3) File storage location

<Service platform installation directory>\CSC\custom-reception\http\config\templates\cscurecphttp.properties
Important note

The file stored here is a template file. To edit HTTP response header definition file, click [Edit] button of the [Self-defined file] in User-defined reception settings window (Details), at the time of adding HTTP reception, and modify the contents of definition file.

(4) Specifiable properties

(a) HTTP reception related

urecp-http.context-root=Context root of HTTP reception ~<<Reception ID of HTTP reception>>

Specify the context root of HTTP reception with one-byte alphanumeric characters and single byte symbols shown as follows:

  • Hyphen (-)

  • Period (.)

  • Underscore (_)

  • Swung dash (~)

  • Forward slash (/)

  • At mark (@)

  • Plus sign (+)

  • Dollar sign ($)

  • Exclamation mark (!)

  • Single quotation mark (')

  • Parentheses (( ))

  • Percent sign (%)

An error will occur if you specify symbols other than those mentioned above and in case of the following:

  • Separator (/) is specified as the first or last character

  • Too many separators (/) are specified

  • Specified with a relative path

  • Percentage (%) is specified with a purpose other than percentage encoding

If you do not specify this property, reception ID of HTTP reception is set.

urecp-http.max-threads= Max. threads in HTTP reception ~<Number>((1-1024))<<10>>

Specify the maximum number of threads in HTTP reception. The value you specify for this property must be larger than the HTTP reception occupied threads count (value specified in the property urecp-http.exclusive-threads).

urecp-http.exclusive-threads=HTTP reception occupied execution threads count~<Number>((0-1024))<<0>>

Specify the HTTP reception occupied threads count. The value you specify for this property must not exceed the max. threads in HTTP reception (value specified in the property urecp-http.max-threads).

urecp-http.queue-size=size of waiting queue of HTTP reception~<Number>((0 - 2147483647))<<8192>>

Specifies the size for pending queue of HTTP reception.

urecp-http.pooled-instance.minimum=minimum number of the instances within the pool of HTTP reception~<Number>((0 or 1 - 2147483647))<<0>>

Specify the minimum number of instances in the pool of HTTP reception, in integers. If you specify 0 for this property, the minimum number of instances in the pool of HTTP reception is not restricted.

Specify a value which is smaller than the value specified in the property urecp-http.pooled-instance.maximum (maximum number of instances in the pool of HTTP reception). If the specified value is larger than the value specified in the property urecp-http.pooled-instance.maximum, there will be an error during execution of operating command.

urecp-http.pooled-instance.maximum=maximum number of instances within the pool of HTTP reception<number>((0 or 1-2147483647))<<0>>

Specify the maximum number of instances in the pool of HTTP reception, in integer. If you specify 0, the maximum number of instances is not restricted.

Specify a value that is greater than the value of the property urecp-http.pooled-instance.minimum (minimum number of instances in the pool of HTTP reception). If the specified value is smaller than the value specified in the property urecp-http.pooled-instance.minimum, an error occurs during the execution of operating command.

urecp-http.ejb-transaction-timeout=EJB transaction timeout time of HTTP reception~<number>((0 or 1-2147483647))<<0>>

Specify the EJB transaction timeout time of HTTP reception, in seconds. If you specify 0, operation is performed with the default timeout value specified in J2EE server.

(b) Properties related to reception settings

httprecp.switchover.pass-through.mode={true|false} ~<<false>>

Specify the mode that generates body variable at the time of passing message body to business process. This property is not case-sensitive.

  • true

    Uses pass-through mode.

  • false

    Uses standard mode.

httprecp.switchover.file-transfer.mode={true|false} ~<<false>>

Specify if work folder is to be created during request reception by HTTP reception. This property is not case-sensitive.

This property is valid for requests other than multi-part type requests. For multi-part type data, work folder is always created.

  • true

    Work folder is created irrespective of whether the request is multi-part type.

  • false

    Work folder is created when request is multi-part type. Otherwise, work folder is not created.

httprecp.http.charset={Shift_JIS|UTF-8} ~<<UTF-8>>

Specify the character code to be used for encoding message body and query. This property is not case-sensitive.

httprecp.response.ignore-bodymsg={true|false} ~<<false>>

Specify if the response message (body) received from business process is to be ignored by HTTP reception (Do not set the response message in HTTP response). This property is not case-sensitive.

  • true

    Response message (body) is not set in HTTP response.

  • false

    Response message (body) is set in the body part of HTTP response.

httprecp.response.header.filename=HTTP response header definition file name

Specify the name of HTTP response header definition file. This property is case-sensitive.

httprecp.system-exception.status-code=status code in case of system exception~<Number>((000-999))<<500>>

Specify the status code during system exception with a 3 digit number.

httprecp.response.generate.content-length={true|false} ~<<true>>

Specify whether to generate the contents length in HTTP reception. This property is not case-sensitive.

  • true

    Generates contents length.

  • false

    Does not generate contents length.

httprecp.file-trans.temp-file.partsize-threshold=threshold size to output the temporary file~<Number>((0 or 1 - 2147483647))<<0>>

Specify the size serving as the threshold size during the output of HTTP request in temporary file, in case of a multi-part type HTTP request, in bytes unit.

If the size of HTTP request received by HTTP reception exceeds the value of this property, the received HTTP request is output in a temporary file. Temporary file is always generated when you have specified 0 in this property.

httprecp.file-trans.maxsize.part=size limit of 1 file of the file data that can be received~<number>((0 or 1-2147483647))<<2147483647>>

Specify the size limit for 1file in file data that can be received through HTTP reception, in bytes unit.

If the size of a part which is to be handled in file format, from among all the parts of multi-part HTTP request received by HTTP reception, exceeds the value specified for this property, a system exception occurs.

httprecp.file-trans.maxsize.request=size limit of HTTP request body that can be received~<number>((0 or 1-2147483647))<<2147483647>>

Specify the size limit for HTTP request body that can be received through HTTP reception, in bytes unit.

If the size of HTTP request body received by HTTP reception exceeds this value, a system exception occurs.

httprecp.work-dir.auto-delete={true|false} ~<<true>>

Specifies if work folder is to be deleted automatically after process completion. This property is not case-sensitive.

  • true

    Work folder is automatically deleted after business process is processed successfully.

  • false

    Work folder is not deleted automatically.

If you specify a value other than false or do not specify a key or a value, value is considered as true is considered. Specify false in this property, when business process is asynchronous type.

httprecp.response.download.disposition-type=value to be specified in the Content-Disposition header of HTTP response header~<<attachment>>

Specify a value which is to be set for Content-Disposition header of HTTP response header when sending data from HTTP reception to HTTP client. This property is not case-sensitive. Note that the validity of specified value is not verified.

The header value set in this property is used only when 1 file is to be downloaded by HTTP client.

httprecp.pass-through.parameter-use={true|false} ~<<true>>

Specify whether to use msg key for HTTP request body, in pass-through mode. This property is not case-sensitive.

This property is enabled only when you have specified true for the httprecp.switchover.pass-through.mode property.

  • true

    Uses msg key.

  • false

    Does not use msg key. The contents of HTTP request body are directly passed on as request message to business process.

(c) Properties related to JSON-XML transformation

httprecp.request.switchover.json-transfer.mode={true|false} ~ <<false>>

Specify whether to perform JSON-XML transformation during request processing of HTTP reception.

  • true

    JSON-XML transformation is performed during request processing HTTP reception.

  • false

    JSON-XML transformation is not performed during request processing HTTP reception.

httprecp.response.switchover.json-transfer.mode={true|false} ~ <<false>>

Specify whether to perform JSON-XML transformation during response processing of HTTP reception.

  • true

    JSON-XML transformation is performed during response processing of HTTP reception.

  • false

    JSON-XML transformation is not performed during response processing of HTTP reception.

(d) Properties related to the HTTP response compression function

httprecp.response.compression.url-patternURL-pattern-identification-number=URL-pattern-of-request-URL

This property corresponds to the <url-pattern> tag in the <filter-mapping> tag that specifies URL mapping of the HITACHI Application Integrated Property File. For details about the HITACHI Application Integrated Property File and the HTTP response compression function, see 10.2 HTTP response compression functionality in the manual uCosminexus Application Server Compatibility Guide.

If you omit this property, no judgement is performed based on the HTTP response compression rule. If you specify the same property multiple times, operations are not guaranteed.

URL-pattern-identification-number

Specify a unique sequential number starting from 1. If the numerical sequence is interrupted, the properties before the point of interrupt are valid.

URL-pattern-of-request-URL

Specify a relative path from the context root of the request URL.

  • The characters are case sensitive.

  • If the specified value matches multiple URL patterns, the setting with the smallest URL pattern identification number is applied.

  • If you specify /*, all request URLs are considered as a match.

If the request URL matches the URL pattern specified here, whether to perform the compression processing is determined based on the HTTP response compression rules specified in the following properties:

  • httprecp.response.compression.rulecompression-rule-identification-number.url-mappingURL-mapping-identification-number=URL-pattern-of-HTTP-response-compression-rule

  • httprecp.response.compression.rulecompression-rule-identification-number.conditioncompression-condition-identification-number=media-type:compression-threshold

To specify multiple URL patterns, specify multiple properties having different URL pattern identification numbers.

  • Example of specifying two URL patterns

    httprecp.response.compression.url-pattern1=/app1/*
    httprecp.response.compression.url-pattern2=/app2/*

httprecp.response.compression.rulecompression-rule-identification-number.url-mappingURL-mapping-identification-number=URL-pattern-of-HTTP-response-compression-rule ~ <</*>>

This property corresponds to the <param-value> tag (under the <init-param> tag under the <hitachi-filter-property> tag) that specifies the URL pattern for the HITACHI Application Integrated Property File. For details about the HITACHI Application Integrated Property File and the HTTP response compression function, see 10.2 HTTP response compression functionality in the manual uCosminexus Application Server Compatibility Guide.

If you omit this property, all request URLs are considered as a match. If you specify the same property multiple times, operations are not guaranteed.

compression-rule-identification-number

Specify a unique sequential number starting from 1. If the compression rule identification number corresponding to the sequential number is not specified in any property, the subsequent properties are invalid.

To specify the media type and compression threshold to be added to the HTTP response compression rule by using the following property, specify the same compression rule identification number.

  • httprecp.response.compression.rulecompression-rule-identification-number.conditioncompression-condition-identification-number=media-type:compression-threshold

URL-mapping-identification-number

For one compression rule identification number, specify a unique sequential number starting from 1. If the numerical sequence is interrupted, the properties before the point of interrupt are valid.

URL-pattern-of-HTTP-response-compression-rule

Specify a relative path from the context root of the request URL.

  • The characters are case sensitive.

  • If the specified value matches multiple URL patterns, the setting with the smallest URL pattern identification number is applied.

  • If you specify /*, all request URLs are considered as a match.

You can specify multiple HTTP response compression rules by combining compression rule identification numbers and URL mapping identification numbers.

To specify multiple URL patterns for one HTTP response compression rule:

Specify multiple properties that have the same compression rule identification number and different URL mapping identification numbers. The following example shows how to specify two URL patterns for compression rule 1.

httprecp.response.compression.rule1.url-mapping1=/app/dir1/*
httprecp.response.compression.rule1.url-mapping2=/app/dir2/*
To specify multiple HTTP response compression rules:

Specify multiple properties that have different compression rule identification numbers. The following example shows how to specify two compression rules. Because their compression rule identification numbers are different, both URL mapping identification numbers are 1, indicating the start number.

httprecp.response.compression.rule1.url-mapping1=/app/dir1/*
httprecp.response.compression.rule2.url-mapping1=/app/dir2/*

httprecp.response.compression.rulecompression-rule-identification-number.conditioncompression-condition-identification-number=media-type:compression-threshold ~ <<*:100>>

This property corresponds to the <param-value> tag (under the <init-param> tag under the <hitachi-filter-property> tag) that specifies the compression rules for the HITACHI Application Integrated Property File. For details about the HITACHI Application Integrated Property File and the HTTP response compression function, see 10.2 HTTP response compression functionality in the manual uCosminexus Application Server Compatibility Guide.

If you omit this property, all HTTP responses of any media type are applicable if the response body exceeds 100 bytes.

If you specify the same property multiple times, operations are not guaranteed.

compression-rule-identification-number

Specify a unique sequential number starting from 1. If the compression rule identification number corresponding to the sequential number is not specified in any property, the subsequent properties are invalid.

To specify the URL pattern to be added to the HTTP response compression rule by using the following property, specify the same compression rule identification number:

  • httprecp.response.compression.rulecompression-rule-identification-number.url-mappingURL-mapping-identification-number=URL-pattern-of-HTTP-response-compression-rule

compression-condition-identification-number

For one compression rule identification number, specify a unique sequential number starting from 1. If the numerical sequence is interrupted, the properties before the point of interrupt are valid.

media-type:compression-threshold

Specify the media type and compression threshold delimited by a halfwidth colon (:).

media-type
  • The characters are not case sensitive.

  • If you specify the same media type multiple times, the setting with the largest compression condition identification number is applied.

  • If you specify an asterisk (*), all media types are applied. However, any setting specified for an individual media type has priority.

compression-threshold
  • Specify an integer in the range from 100 to 2,147,483,647 (unit: bytes).

You can specify multiple HTTP response compression rules by combining compression rule identification numbers and compression condition identification numbers.

To specify multiple media types and compression thresholds for one HTTP response compression rule:

Specify multiple properties that have the same compression rule identification number and different compression condition identification numbers. The following example shows how to specify two media types and compression thresholds for compression rule 1.

httprecp.response.compression.rule1.condition1=text/html:500
httprecp.response.compression.rule1.condition2=*:1000
To specify multiple HTTP response compression rules:

Specify multiple properties that have different compression rule identification numbers. The following example shows how to specify two compression rules. Because their compression rule identification numbers are different, both compression condition identification numbers are 1, indicating the start number.

httprecp.response.compression.rule1.condition1=text/html:500
httprecp.response.compression.rule2.condition1=*:1000

(5) Example of coding

(a) Example of coding 1

An example of description is as follows:

urecp-http.max-threads=10
urecp-http.exclusive-threads=0
urecp-http.queue-size=8192
urecp-http.pooled-instance.minimum=0
urecp-http.pooled-instance.maximum=0
urecp-http.ejb-transaction-timeout=0
httprecp.switchover.pass-through.mode=false
httprecp.switchover.file-transfer.mode=false
httprecp.http.charset=UTF-8
httprecp.response.ignore-bodymsg=false
httprecp.response.header.filename=cscurecphttp_header.properties
httprecp.system-exception.status-code=500
httprecp.response.generate.content-length=true
httprecp.request.switchover.json-transfer.mode=true
httprecp.response.switchover.json-transfer.mode=true

(b) Example of coding 2: Compressing the response body in gzip format

The following example shows how to compress the response body in gzip format by specifying multiple compression conditions.

# Setting of compression target HTTP request
httprecp.response.compression.url-pattern1=/app/*
 
# Compression rule 1
httprecp.response.compression.rule1.url-mapping1=/app/dir1/*
httprecp.response.compression.rule1.condition1=text/html:100
httprecp.response.compression.rule1.condition2=application/pdf:1000
 
# Compression rule 2
httprecp.response.compression.rule2.url-mapping1=/app/dir2/*
httprecp.response.compression.rule2.url-mapping2=/app/dir3/*
httprecp.response.compression.rule2.condition1=text/html:200

This example specifies that HTTP requests for which a relative path from the context root of the request URL begins with /app/ will be compressed. In addition, the following two compression rules are specified.

  • Compression rule 1

    • For the HTTP request, the relative path from the context root of the request URL begins with /app/dir1/.

    • The media type of the HTTP request is text/html and the body size of the HTTP response exceeds 100 bytes.

    • The media type of the HTTP request is application/pdf and the body size of the HTTP response exceeds 1,000 bytes.

  • Compression rule 2

    • For the HTTP request, the relative path from the context root of the request URL begins with /app/dir2/ or /app/dir3/.

    • The media type of the HTTP request is text/html and the body size of the HTTP response exceeds 200 bytes.