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 an Entire Flat File Dictionary with Data
 
Creating an Entire Flat File Dictionary with Data
The following describes the basic steps to create an entire flat file dictionary when using either an XML file or mapping data. This procedure describes how to create a flat file dictionary that contains data. If you want to create an empty flat file dictionary, see Creating an Empty Flat File Dictionary.
Important:
The flat file dictionary you are creating must not already exist in the Integration Server namespace. If the flat file dictionary already exists, the pub.flatFile.generate:saveXMLAsFFDictionary service throws an exception.
Using this method
Follow this procedure
XML File
1. Supply the data that includes all entries for the dictionary 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.
3. Create the dictionary in the Integration Server namespace by invoking the pub.flatFile.generate:saveXMLAsFFDictionary service.
Mapping Data
1. Map the data for all entries for the dictionary you want to create to an IData object that conforms to the pub.flatFile.generate:FFDictionary IS document type.
2. Convert the IData object to an XML string by invoking the pub.xml:documentToXMLString service. When you invoke this service:
*Set the encode input variable to true.
*Set the documentTypeName input variable to pub.flatFile.gnerate:FFDictionary.
For more information about the pub.xml:documentToXMLString 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:saveXMLAsFFDictionary service.