Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Processing Flat Files | Sending and Receiving Flat Files | Creating Flat File Dictionary Entries, Dictionaries, and Schemas | Creating a Flat File Schema
 
Creating a Flat File Schema
The following describes the basic steps to create a flat file schema when using either an XML file or mapping data:
Important:
The flat file schema you are creating must not already exist in the Integration Server namespace. If the flat file schema already exists, the pub.flatFile.generate:saveXMLAsFFSchema service throws an exception.
Using this method
Follow this procedure
XML File
1. Supply the data for the flat file schema you want to create by creating an XML file that contains the data and that conforms to the XML schema:
Integration Server_directory \instances\instance_name\packages\WmFlatFile\pub\FFGeneration.xsd
2. Retrieve the contents of the XML file as an XML string. For more information, see Creating a Service that Retrieves the XML File.
Mapping Data
1. Map the data for the flat file schema you want to create to an IData object that conforms to the pub.flatFile.generate:FFSchema IS document type.
2. Convert the IData object to an XML string by invoking pub.xml:documentToXMLString service. When you invoke this service:
*Set the encode input variable to true.
*Set the documentTypeName input variable to pub.flatFile.generate:FFSchema.
For more information about the pub.xml:documentToSXLString service, see the webMethods Integration Server Built-In Services Reference
3. Create the dictionary in the Integration Server namespace by invoking the pub.flatFile.generate:saveXMLAsFFSchema service.