- Welcome
- Introducing Babelway B2B Integration
- Starting with Babelway
- Managing Account Environments
- Managing Channels
- The Catalogue
- Tracking Messages
- Managing Alerts
- Managing Your Account
- Best Practices
- Channels
- List of Channels
- View Change Log
- General
- Gateway In
- Message In
- Transformation
- Message Out
- Gateway Out
- Email Gateway Out
- Ftp Client Gateway Out
- SFTP Client Gateway Out
- Ftp Server Gateway Out
- AS2 Gateway
- Http Client Out Gateway
- Web Gateway
- Generic Gateway
- Internal Gateway Out
- Null Gateway
- OFTP Server Gateway out
- OFTP client Gateway out
- Http Out Gateway
- SOAP Gateway
- Soap Client Out Gateway
- X.400 Gateway out
- Aggregator Gateway Out
- Email Gateway Out
- Email Notifications
- Routing
- Testing
- List of Channels
- Building a Channel
- The Catalogue
- Tracking Messages
- Alerts
- Account Management
- Rest API
- Receive Orders From
- Receive Orders from Colruyt
- Receive Orders from Carrefour
- Receive Orders from Brico
- Receive Orders from Castorama
- Receive Orders from Cora BE
- Receive Orders from Delfood
- Receive Orders from Delhaize
- Receive Orders from DEliXL
- Receive Orders from Intergamma
- Receive Orders from Intermarche
- Receive Orders from JavaFresh
- Receive Orders from Makro
- Receive Orders from Match
- Receive Orders from Carrefour France
- Receive Orders from Colruyt
- Integrate Orders with
- Integration with Tradeshift
- Integration with Exact Online or Exact Globe
- Channel:SAP Idoc XML Order05 w/ Http client out
- System Metadata
- ODETTE Messages List
- External References
See: Managing Channels - Manage a Channel
Flat File Wizard screen allows you to define your Flat File message format according to your own file format.
To define a message in Flat File format, select an existing template or make a copy of the generic Flat File template in the catalogue and following screen will be displayed.
Wizard screen
When you create a new message format, you must first configure it using the following wizard.
A Flat File messsage can only be set up using sample files, either an ServingXml resource file and a XSD file or an XML file. Select your sample file(s) using the
Edit...
buttons next to the Serving XML, XSD and/or XML file, according to your sample file(s) format, then click on the
Upload
command(s) then click on Save.
Hint: If you will upload XML sample, you should first refine the sample by keeping only one occurrence of each XML element.
File sample
Following is a sample Flat file.
EE54001340000093012918100700000000000147521 DD0000018713906060109 6011 3005330101 DD0000028713906061106 6111 3005250201
This file has a number of properties.
- The first row is a envelope .
- The second row is details .
ServingXml resources file
Shown below is the simplest possible resources script that will read this data and output it as XML.
<sx:resources xmlns:sx="http://www.servingxml.com/core"> <sx:service id="csvtoxml"> <sx:serializebuild.bat> <sx:xsltSerializer> <sx:outputProperty name="indent" value="yes"/> </sx:xsltSerializer> <sx:transform> <sx:content ref="Sample"/> </sx:transform> </sx:serialize> </sx:service> <sx:recordContent id="Sample"> <sx:recordStream> <sx:flatFileReader> <!--<sx:urlSource url="data/Sample.txt"/>--> <sx:flatFile ref="SampleFlatFile"/> </sx:flatFileReader> </sx:recordStream> <sx:recordMapping ref="SampleToXmlMapping"/> </sx:recordContent> <sx:flatFile id="SampleFlatFile" quote="never"> <sx:flatFileBody> <sx:flatRecordTypeChoice> <sx:positionalField name="record_type" width="2"/> <sx:when test="record_type='EE'"> <sx:flatRecordType name="envelope"> <sx:positionalField name="EEtag" width="2"/> <sx:positionalField name="Sender" width="13"/> <sx:positionalField name="Recip" width="13"/> <sx:positionalField name="Iref" width="14"/> <sx:positionalField name="Testind" width="1"/> <sx:positionalField name="Splitref" width="35"/> </sx:flatRecordType> </sx:when> <sx:when test="record_type='DD'"> <sx:flatRecordType name="details"> <sx:positionalField name="DDtag" width="2"/> <sx:positionalField name="Linenr" width="6"/> <sx:positionalField name="ArtEAN" width="14"/> <sx:positionalField name="ArtSA" width="35"/> <sx:positionalField name="ARTBP" width="35"/> </sx:flatRecordType> </sx:when> </sx:flatRecordTypeChoice> </sx:flatFileBody> </sx:flatFile> <sx:recordMapping id="SampleToXmlMapping"> <csv:csv xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:csv="http://xmlns.babelgom.com/2007/message-format/csv" xsi:schemaLocation="http://xmlns.babelgom.com/2007/message-format/csv csv.xsd"> <sx:onRecord recordType="envelope"> <csv:line> <sx:fieldElementMap field="EEtag" element="csv:field"/> <sx:fieldElementMap field="Sender" element="csv:field"/> <sx:fieldElementMap field="Recip" element="csv:field"/> <sx:fieldElementMap field="Iref" element="csv:field"/> <sx:fieldElementMap field="Testind" element="csv:field"/> <sx:fieldElementMap field="Splitref" element="csv:field"/> </csv:line> </sx:onRecord> <sx:innerGroup startTest="sx:current/header"> <csv:order> <sx:onRecord recordType="details"> <csv:line> <sx:fieldElementMap field="DDtag" element="csv:field"/> <sx:fieldElementMap field="Linenr" element="csv:field"/> <sx:fieldElementMap field="ArtEAN" element="csv:field"/> <sx:fieldElementMap field="ArtSA" element="csv:field"/> <sx:fieldElementMap field="ARTBP" element="csv:field"/> </csv:line> </sx:onRecord> </csv:order> </sx:innerGroup> </csv:csv> </sx:recordMapping> </sx:resources>
This resources script produces the following output.
<?xml version="1.0" encoding="UTF-8"?>
<csv:csv xmlns:csv="http://xmlns.babelgom.com/2007/message-format/csv"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.babelgom.com/2007/message-format/csv csv.xsd">
<csv:line>
<csv:field>EE</csv:field>
<csv:field>5400134000009</csv:field>
<csv:field>3012918100700</csv:field>
<csv:field>00000000014319</csv:field>
<csv:field>1</csv:field>
<csv:field/>
</csv:line>
<csv:order>
<csv:line>
<csv:field>DD</csv:field>
<csv:field>000001</csv:field>
<csv:field>8713906060109</csv:field>
<csv:field>6011</csv:field>
<csv:field>3005330101</csv:field>
</csv:line>
<csv:line>
<csv:field>DD</csv:field>
<csv:field>000002</csv:field>
<csv:field>8713906061106</csv:field>
<csv:field>6111</csv:field>
<csv:field>3005250201</csv:field>
</csv:line>
</csv:order>
</csv:csv>For more information about ServingXML, please visit http://servingxml.sourceforge.net/
Edit screen
Once the message format sample has been uploaded, or when it is used or copied from a saved format, edit screen appears as follows.
See Message Edit Functions for further information on message definition, contextual menu and additional commands available on this screen.
Babel Academy
Community Forum
Support



Prev


Up
Reference Manual