XML flat files
In some cases, legacy applications produce XML files. These native XML files need to be translated into a format that is usable by Sterling Order Management System Software by means of an XSL.
If the input flat files are XML files, then the source XML must contain a root element, followed by a sequence of one or more child elements. Each child element under the root element is treated as the input for the flat file receiver service. For example, if the source XML is like so:
<?xml version="1.0" encoding="UTF-8"?>
<Orders>
<Order name="A1">....</Order>
<Order name="A2">....</Order>
<Order name="A3">....</Order>
</Orders>.
then the input XML is processed to create three different XMLs, as follows:
<Order name="A1"/>
<Order name="A2"/>
<Order name="A3"/>
The API that has been configured for this flat file receiver is executed three times, each with a different XML as shown above.
For examples of flat files
using the createOrder()
API as input, see the <INSTALL_DIR>/xapidocs/code_examples/flatfile/
directory.
The location of the data in the flat file is specified as the incoming directory within the configuration. The flat file is used as input to a Sterling Order Management System Software API, as determined by the XSD.