uCosminexus Service Platform, Reception and Adapter Definition Guide

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

Appendix E.1 When converting from the XML format to the binary format with the split processing method

This section provides an example of the definitions you need to create when using the split processing method to transform messages from XML to binary format.

The following figure shows an example of an input XML file and output binary file used in this example:

Figure E-1 Example of input XML file and output binary file

[Figure]

This example uses header records and trailer records. The split processing method applies at the level of individual records.

The following table lists the files required for this transformation:

Table E-1 Files required for transformation (when transforming from XML to binary format)

# File type Format
1 Input XML schema XSD
2 Binary format definition file for output header records FDX
3 Binary format definition file for output data records FDX
4 Binary format definition file for output trailer records FDX
5 Data transformation definition file for header records XSL
6 Data transformation definition file for data records XSL
7 Data transformation definition file for trailer records XSL
8 File operation adapter definition file Property file

When outputting a file in binary format, you need to create binary format definition files (#2, #3, and #4) and data transformation definition files (#5, #6, and #7) for each record type.

For details on how to create binary format definition files, see 4.4 Creating Message Formats (Binary Format Definition File)in the manual Service Platform Basic Development Guide. For details on how to create data transformation definition files, see the description for displaying from the Eclipse menu in 6.3.1 Procedure for Defining Data Transformation in the manual Service Platform Basic Development Guide.

  1. Input XML schema (XSD file)
    Use an application such as the WST (Web Standard Tools) provided by Eclipse to create an input XML schema with the content below. Specify FOPSchema.xsd as the file name of the input XML schema.

    [Figure]

    The figure shows the input XML schema loaded as the transformation-source schema when creating a mapping definition file.
  2. Binary format definition file for output header records (FDX file)
    Create the binary format definition file as shown below. Specify FOPHeaderFormat1.fdx as the file name of the binary format definition file.

    [Figure]

  3. Binary format definition file for output data records (FDX file)
    Create the binary format definition file as shown below. Specify FOPDataFormat1.fdx as the file name of the binary format definition file.

    [Figure]

  4. Binary format definition file for output trailer records (FDX file)
    Create the binary format definition file as shown below. Specify FOPTrailerFormat1.fdx as the file name of the binary format definition file.

    [Figure]

  5. Data transformation definition file for header records (XSL file)
    Create the data transformation definition file as shown below. Specify FOPHeader1.xsl as the file name of the XSL file. When creating a new mapping definition file, specify FOPSchema.xsd as the transformation-source schema and FOPHeaderFormat1.fdx as the transformation-target schema.

    [Figure]

  6. Data transformation definition file for data records (XSL file)
    Create the data transformation definition file as shown below. Specify FOPData1.xsl as the file name of the XSL file. When creating a new mapping definition file, specify FOPSchema.xsd as the transformation-source schema and FOPDataFormat1.fdx as the transformation-target schema.

    [Figure]

  7. Data transformation definition file for trailer records (XSL file)
    Create the data transformation definition file as shown below. Specify FOPTrailer1.xsl as the file name of the XSL file. When creating a new mapping definition file, specify FOPSchema.xsd as the transformation-source schema and FOPTrailerFormat1.fdx as the transformation-target schema.

    [Figure]

  8. File operation adapter definition file
    In the Service adapter definition (details) screen, select cscFileOperation.properties in the Self-defined file area, and click Edit. Then, define the file as follows:

    [Figure]

    For details on file operation adapter definition files, see File operations adapter definition file in the manual Service Platform Reference Guide.
  9. Service adapter definition
    In the Service adapter definition (details) screen, add the following files as self-defined files:
    • FOPHeaderFormat1.fdx
    • FOPDataFormat1.fdx
    • FOPTrailerFormat1.fdx
    • FOPHeader1.xsl
    • FOPData1.xsl
    • FOPTrailer1.xsl