3.14.4 Binary-message-generation definition file
- Organization of this subsection
(1) Format
You can code the file by using any of the following three formats.
- Specification format 1
element-name-as-absolute-path-from-root=set-value
- Specification format 2
element-name=set-value
- Specification format 3
[CSCDT_STRING=set-value-of-data-type-String] [CSCDT_INT=set-value-of-data-type-Integer] [CSCDT_DOUBLE=set-value-of-data-type-Real-number] [CSCDT_IMPLICIT=set-value-of-data-type-Fixed-decimal-number] [CSCDT_ZONE=set-value-of-data-type-Numeric-value-in-zone-format] [CSCDT_PACK=set-value-of-data-type-Numeric-value-in-pack-format] [CSCDT_SIGNED=set-value-of-data-type-Signed-binary-integer] [CSCDT_UNSIGNED=set-value-of-data-type-Unsigned-binary-integer] [CSCDT_BINARY_HEX=set-value-of-data-type-Byte-string-(hexBinary)] [CSCDT_BINARY_BASE64=set-value-of-data-type-Byte-string-(base64Binary)] [CSCDT_BIT=set-value-of-data-type-Bit-string] [CSCDT_DATETIME=set-value-of-data-type-Date/time]
If the same element is coded in different specification formats, the value is applied according to the following priority:
-
Specification format 1
-
Specification format 2
-
Specification format 3
(2) Function
If you want to change an element value of a simple content element from the default value when generating a binary message, this value sets a new value. The available character code is UTF-8 only.
Specify this file when generating a binary message by using the following command or property file. When generating a binary message with the default values, you do not have to set up this file. If this file is not set up, the default element values are applied.
-
cscgenbinary command
Specify the name of the binary-message-generation definition file in the -genproperty option.
For details about the cscgenbinary command, see cscgenbinary (Generating binary messages from binary format definition files).
-
binary-message-generation command properties file
Specify the name of the binary-message-generation definition file in the csctransform.generate.property property.
For details about the binary-message-generation command properties file, see 3.14.3 Binary-message-generation command properties file.
(3) File storage location
The template file is stored in the following location.
- Location of the template file:
service-platform-installation-directory\CSCTE\template\cscdt_generatedef.properties
The template file is coded in the property format (specification format 3). Copy the template file to any directory, edit the file, and then save it with any file name.
(4) Specifiable values
The following shows the default element values for a simple content element and the XML types. Specify an appropriate value in the file according to the relevant XML type.
Data type |
XML type |
Default value |
Property name in specification format 3 |
---|---|---|---|
String |
xsd:string |
Empty string (length 0 bytes) |
CSCDT_STRING |
Integer |
xsd:decimal |
0 |
CSCDT_INT |
Real number |
xsd:decimal |
0 |
CSCDT_DOUBLE |
Fixed decimal number |
xsd:decimal |
0 |
CSCDT_IMPLICIT |
Numeric value in zone-format |
xsd:decimal |
0 |
CSCDT_ZONE |
Numeric value in pack format |
xsd:decimal |
0 |
CSCDT_PACK |
Signed binary integer |
xsd:integer |
0 |
CSCDT_SIGNED |
Unsigned binary integer |
xsd:integer |
0 |
CSCDT_UNSIGNED |
Byte string (hexBinary) |
xsd:hexBinary |
00 (0x00) |
CSCDT_BINARY_HEX |
Byte string (base64Binary) |
xsd:base64Binary |
AA== (0x00) |
CSCDT_BINARY_BASE64 |
Bit string |
xsd:hexBinary |
00 (0x00) |
CSCDT_BIT |
Date/time |
xsd:date |
|
CSCDT_DATETIME |
xsd:time |
|
||
xsd:dateTime |
|
The following describes the specification formats and shows specification examples. If no value is specified for set-value after =, the element will be an empty element.
- Specification format 1
-
- element-name-as-absolute-path-from-root=set-value
-
Specify an element name as an absolute path from the root and the set value after the change.
The specification example is as follows.
Example: /root/complex/element=abc
- Specification format 2
-
- element-name=set-value
-
Specify an element name without a path and the set value after the change.
The specification example is as follows.
Example: element=abc
- Specification format 3
-
- property-name=set-value
-
Specify a property name in Table 3-4 Set values of a binary-message-generation definition file and the set value after the change according to the data type.
The specification example is as follows.
Example: CSCDT_STRING=abc