uCosminexus Service Platform, Reception and Adapter Definition Guide
This subsection describes types of message format to be used in HTTP reception, format and creation method of each type.
The following table describes the types of message format to be used in HTTP reception. You can create a message format using XML schema provided by service platform.
Table 2-9 Types of message format
| Major classification | Minor classification | Description |
|---|---|---|
| Request message format | For header variable | Set the header information and URL information of HTTP request. |
| For body variable (main) | Set the body information of HTTP request. | |
| For body variable (details) | It is referenced as a part of request message format (body variable (main)). | |
| Response message format | For header variable | Set the header information of HTTP response. |
| For body variable | Set the body information of HTTP response. |
Create a message format other than the above-mentioned to use validation activity in a business process.
The request message format and response message format to be used in HTTP reception is described here.
The following table describes the request message format of header variable, which is passed on to HTTP reception, when HTTP reception is invoked by a business process. The name of the namespace is "http://www.hitachi.co.jp/soft/xml/cosminexus/csc/reception/http/request".
Table 2-10 Request message format (for header variable)
| Tag name | Type | Occurrence count | Description | |||
|---|---|---|---|---|---|---|
| <http-header-request> | - | 1 time | - | |||
| <auth> | - | 0 or 1 time | When HTTP header authentication is specified, this tag is created. | |||
| <username> | string | 1 time | Name of the authenticated user is set. Information about the user name is decoded in plain text and it is set. | |||
| <method> | string | 1 time | HTTP method used in HTTP reception (GET or POST) is set. | |||
| <url> | - | 1 time | Location information and query string are set from the request URL. | |||
| <location> | string | 1 time | Location information is set. | |||
| <query> | string | 0 or 1 time | Request string is set. | |||
| <content-type> | string | 0 or 1 time | Media type specified in Content-Type header is set. Charset attribute (character code) specified in Content-Type header is set in charset attribute of content-type tag. This attribute is not set, if charset attribute is not provided. |
|||
| <request-id> | string | 0 or 1 time | Request ID generated by HTTP reception is set. | |||
| <files> | - | 0 or 1 time | List of intermediate files generated within the working folder is set based on the multi-part data received from HTTP client. | |||
| <file> | - | More than 0 time | The intermediate files generated within the working folder are set based on the multi-part data received from HTTP client. | |||
| <partID> | string | 0 or 1 time | Identifier for differentiating each part is set. This part ID corresponds to name attribute of Content-Disposition header of each part within multi-part data received by HTTP reception. |
|||
| <file-name> | string | 0 or 1 time | File name of the file data received from HTTP client is set. This file name corresponds to filename attribute of Content-Disposition header of each part within multi-part data received by HTTP reception. In case of path specification, only the file name is set. |
|||
| <local-file-name> | string | 1 time | Name of the intermediate file generated within the working folder is set. Name of the intermediate file is unique within the working folder. |
|||
| <content-type> | string | 0 or 1 time | Media type of the file data received by HTTP reception is set. This content type corresponds to the value of Content-Type header of each part within the multi-part data received by HTTP reception. If Content-Type header of each part is omitted, this tag is not generated. Charset attribute (character code) specified in Content-Type header of each part is set in charset attribute of content-type tag. This attribute is not set, if charset attribute is not provided. |
|||
| <http-header> | any | 0 or 1 time | The HTTP header information received by HTTP reception is converted into header variable and it is set. For details, see 2.13.4 HTTP reception request process in the manual Service Platform Overview. | |||
The following table describes the request message format of the body variable passed on to HTTP reception, when HTTP reception is invoked by a business process. Name of each namespace is "http://www.hitachi.co.jp/soft/xml/cosminexus/csc/reception/http/request".
Table 2-11 Request message format (for body variable)
| Tag name | Type | Occurrence count | Description | |
|---|---|---|---|---|
| <http-body-request> | - | 1 time | - | |
| <parameter> | http-body-requestType | More than 0 time | The information of the request body is converted into body variable and it is set. For details, see 2.13.4 HTTP reception request process in the manual Service Platform Overview. | |
The following table describes the response message format of the header variable, which is passed on, when a business process is invoked by HTTP reception. Name of the namespace is "http://www.hitachi.co.jp/soft/xml/cosminexus/csc/reception/http/response".
Table 2-12 Response message format
| Tag name | Type | Occurrence count | Description | |||
|---|---|---|---|---|---|---|
| <http-header-response> | - | 1 time | - | |||
| <status-code> | string | 0 or 1 time | Specify the status code of HTTP response. | |||
| <content-type> | string | 0 or 1 time | Specify Content-Type header of the data indicated in the response message (for body variable) of HTTP reception. If null is specified, it is considered that this element is omitted. If data type is multi-part, the content type is to be used as Content-Type header to be provided for response message (for body variable) converted into part. Specify character code which is used as charset attribute of Content-Type header in charset attribute of content-type element. If null is specified, it is considered that this element is omitted. If charset attribute or any other attribute is specified in the value of content-type element, operation is not guaranteed. |
|||
| <body-partID> | string | 0 or 1 time | When sending multi-part data to HTTP client, specify the value of name attribute of Content-Disposition header to be provided for response message (for body variable) converted into part. If you omit value of body-partID element and store response message (for body variable) in multi-part data, "csc-body-text" is set in the value of this name attribute. If the data type is not multi-part, this value is ignored. |
|||
| <ignore-bodymsg> | boolean | 0 or 1 time | Ignore response message (body) and specify whether to return HTTP response to HTTP client. If you specify true in the value of this element, HTTP response is returned to HTTP client and response message (body) is ignored. If false is specified, response message (body) is used. If you do not specify this element or if you specify an invalid string in this element, the value specified in httprecp.response.ignore-bodymsg property of HTTP reception definition file is applied. If you specify a value in both ignore-bodymsg element of response message (header) and httprecp.response.ignore-bodymsg property of HTTP reception definition file, specification of response message (header) gets a priority. |
|||
| <files> | string | 0 or 1 time | Specify a list of intermediate files to be read from the working folder and to be sent to HTTP client. | |||
| <file> | - | More than 0 time | Specify an intermediate file to be read from the working folder and to be sent to HTTP client. | |||
| <partID> | string | 0 or 1 time | Specify an identifier for identifying each part, when the data type is multi-part. This is a string to be provided for the value of name attribute of Content-Disposition header with each part unit of multi-part data in HTTP response. If this tag is omitted, the value of local-file-name tag is set. When the value of ignore-bodymsg element is "true" or httprecp.response.ignore-bodymsg property of HTTP reception definition file is "true" (setting to ignore response message (body)) and the intermediate file to be sent to HTTP client is 1, specification of this tag is ignored since it is not multi-part type. |
|||
| <file-name> | string | 0 or 1 time | Specify the file name, when it is to be downloaded by HTTP client. This is a string to be provided for the value of filename attribute of Content-Disposition header in each part of multi-part data in HTTP response. If you omit this tag, filename attribute is not set. |
|||
| <local-file-name> | string | 1 time | Specify name of the intermediate file within the working folder to be downloaded to HTTP client. File having name specified in this tag is read from the working folder and it is set in body part of HTTP response or body part of each part of multi-part data. If you omit this tag, a system exception occurs. |
|||
| <content-type> | string | 0 or 1 time | Specify media type of the file to be sent HTTP client. This is a value to be provided to Content-Type header in each part of multi-path data in HTTP response. If you omit this tag, the media type is not set. If you specify null, it is considered that specification of this element is omitted. Specify the character code to be used as charset attribute of Content-Type header in charset attribute of content-type element. If you specify null, it is considered that specification of this element is omitted. If you specify charset attribute or any other attribute in the value of content-type element, the operation is not guaranteed. |
|||
| <http-header> | any | 0 or 1 time | Specify the information of HTTP response header. Specify this tag as a child element of <http-header> by considering the element name as header field and the value as header value. If you do not specify, the information of HTTP response header definition file is used as HTTP response header. |
|||
The following table describes the response message format of the body variable to be passed on when HTTP reception invokes a business process. The name of the namespace is "http://www.hitachi.co.jp/soft/xml/cosminexus/csc/reception/http/response".
Note that this message format is the dummy format of the response message format (for body variable). Use this message format, when either the value of ignore-bodymsg element of response message (header) is "true" or the value of httprecp.response.ignore-bodymsg property of HTTP reception definition file is "true" (settings for ignoring response message (body)).
In case of settings for ignoring response message (body), if you do not set response message format (for body variable) in HTTP reception, the business process cannot return a variable, since the variable of response message (body) does not exist. Therefore, it is recommended that you set this dummy format in HTTP reception, create a variable of response message (body), and assign it to reply activity.
Table 2-13 Request message format (for body variable) (in case of setting for ignoring response message (body))
| Tag name | Type | Occurrence count | Description | |
|---|---|---|---|---|
| <http-body-response> | - | 1 time | - | |
| <any> | string | More than 0 time | - | |
In case of setting for not ignoring the response message (body), the user must create response message format (for body variable) for HTTP response.
Method of creating message format to be used in HTTP reception is described here.
XML schema of the message format provided by service platform is stored in "Installation directory of service platform\CSC\custom-reception\http\schema". When editing this schema, first copy it at any location in each folder.
The following table describes relation of XML schema to be used with the message format:
Table 2-14 Relation of XML schemas to be used with the message format
| Message format | XML schema to be used | Editing by user | Description |
|---|---|---|---|
| Request message format (for header variable) | urecp_http_header_request.xsd | Not required | Use XML schema file provided by service platform as-is. |
| Request message format (for body variable (main))# | urecp_http_body_request.xsd | Not required | Use XML schema file provided by service platform as-is. |
| Request message format (for body variable (details))# | urecp_http_body_detail_request.xsd | Optional | When using value of request message (body), edit the XML schema file provided by service platform partially and use them. When you do not use value of request message (body), do not use the XML schema file provided by service platform. |
| Response message format (for header variable) | urecp_http_header_response.xsd | Not required | Use the XML schema file provided by service platform as-is. |
| Response message format (for body variable)# | urecp_http_dummy_body_response.xsd | Not required | Use the XML schema file provided by service platform as-is. It is recommended that you this file in case of settings for ignoring response message (body). |
| To be created by user | Required | If the option of "Do not ignore response message (body)" is set, the user must create the message format as per the contents of HTTP request. |
The following table describes the method of creating XML schema of request message format (for body variable) and response message format (for body variable) (in case of to be created by user):
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.