ECS/XML Sample Application

The ECS/XML Sample Application has been provided to give the developer a head start in building Inbound and Outbound mapping definitions. 

The theme of the sample application is order processing; Inbound Customer Orders and Outbound Purchase Orders. The sample programs provide you with all the necessary files, programs and data to process sample inbound and outbound Orders. 

The following set up instructions will guide you through the creation of the necessary sample programs and the execution of the transactions to process inbound and outbound Orders.

Sample Application Set up

Before commencing this section please ensure that you have the necessary AS/400 authority to create the required objects and that you are technically able. This section requires a good understanding of the AS/400, DB/400, PDM, RPG, Query and some knowledge of XML.  

The sample application programs and files are shipped as source only. 

 

Step 1. Create the necessary objects

The following source members should be displayed:  

Object Type Description
XOH PF Sample Order Header file 
XOL PF Sample Order Lines file 
XSETUP RPG Sample XML Data Setup 
X401 RPG Sample Inbound Order Converter 
X401S RPG Sample Inbound Order Selector 
X501 RPG Sample Outbound Order Generator 
X501S RPG Sample Outbound Order Selector 

If any of the objects fail to compile review the compiler listing and Joblog. 

 

Step 2. Set up the necessary ECS/integrated email configuration

The next step is to set up the XML Events within  ECS/integrated email to enable the transaction processing of Inbound and Outbound Orders. The XML sample Set up program (XSETUP) will perform the following: 

Perform the following steps to set up the XML Sample data:

 

Step 3. Create the necessary Folders on the PC Hosting ECS/integrated email

The sample application has been set up to process Inbound and Outbound XML Documents to/from specific folders on the PC that is running the ECS/ie Client software.  It is necessary to manually create the following folders on the PC before continuing to process the XML Samples: 

Note: If you are unable to create the folders with exactly the path as specified then it is important that the XML Events are changed accordingly. For more information on maintaining XML Event values click here.

 

Step 4. Process Outbound Purchase Orders  

The set up is complete and you are now ready to process outbound Purchase Order to create XML Order Documents. 

Calling the Purchase Order XML Selector program (X501S) reads through the Sample Order Header and selects all unprocessed records (OHPCF<>"1"). The Selector attempts to locate a related XML Event in ECS/integrated email (File: IEXE) and if found, will call the Outbound Orders XML Generation program X501. The result should be a an XML Document in the Output folder (C:\XML\OUT)

To create Outbound Purchase Order XML Documents perform the following steps:

To rerun the inbound Order process, call the XML Samples Set up program again (CALL XSETUP) to create another Purchase Order and repeat these steps. 

Note: If the XML Processor did not run then Edit the XML Event to enable the XML Processor 

 

Step 5. Process Inbound Orders  

Calling the Inbound Order XML Selector program (X401S) reads through the ECS/XML Control file and selects any Inbound Orders that have been processed by the ECS/XML Processor and is ready for mapping to the business application. In this scenario we are have an Inbound Orders conversion program (X401) that maps the XML Document data to the Sample Order Header file (XOH) and Order Lines (XOL). 

To process the sample Inbound XML Order document perform the following steps:

To rerun the inbound Order process, repeat these steps. 

 

Step 6. Getting Started with development

The source code for the sample programs are well documented. Review the sample programs X401, X401S, X501 and X501S. Use these programs as templates for developing integration programs with your own business application. 

For more information on ECS/XML integration with Business applications refer to the following: 

> How  to Integrate Inbound XML documents to your Business Application

 

> How  to Integrate Outbound XML documents with your Business Application

 

<<<<< Back to ECS/XML Menu <<<<< 

Copyright © 1998-2003 Electronic Commerce Solutions All rights reserved.

ECS/integrated email & ECS/ie are trademarks of Electronic Commerce Solutions, Ltd. Other brand names and product names used in this document are the trademarks and trade names of their respective holders and may be registered.