Using the XML File Feed

Purpose: Use the XMLFILE job in Working with Integration Layer Processes (IJCT) to process batches of XML messages. The job checks a designated folder on your server to process the:

• CWOrderIn message: see the Generic Order Interface (Order API).

• inCreateInvXaction message: see the Generic Inventory Transaction Upload.

• CWReceiptIn message: see the Purchase Order Receipt In API.

XML File Feed Process

Uploading the messages to the application server: Use the Working with File Uploads (WUPL) menu option to upload the batch of XML messages to the folder designated in the IJCT_XMLFILE_DIRECTORY_PATH setting in the CWDirectCP Server Properties File.

XML file name:

• The file must end with the .xml suffix and start with:

InvTran_ for the inCreateInvXaction message

Order_ for the CWOrderIn message

PORcpt_ for the CWReceiptIn message

• The file name is not case-sensitive.

• Each file name should be unique. Typically, you would use a time or date stamp to identify each file (for example, InvTran_113010.xml).

XML file contents: Each of the .xml files should contain a series of valid XML messages, each separated by a carriage return.

Directory path requirements: The directory path must be formatted with double slashes between each folder level, and must end with double slashes. For example: IJCT_XMLFILE_DIRECTORY_PATH=////SERVER//xsp//data// where SERVER is the name of the server, and the subfolder is \xsp\data.

Note: If you use a multi-server environment for CWSerenade and might be running the related processes from more than one server, you need to have the entries in the properties files for each server set consistently.

XMLFILE job: When the XMLFILE job in Working with Integration Layer Processes (IJCT) starts, it:

• checks the folder designated in the IJCT_XMLFILE_DIRECTORY_PATH property for the XML files to process. The job looks for a file that ends with the .xml suffix and starts with:

InvTran_ for the inCreateInvXaction message.

Order_ for the CWOrderIn message.

PORcpt_ for the CWReceiptIn message.

• submits the file to the related API.

Example: The folder contains a file named Order_113010.xml. The XMLFILE job submits the messages in the file to the generic order API for processing.

Starting integration layer processes? It is not necessary to start the XMLFILE job in order to process the messages in the designated folder.

Response file? If the messages in a file require a response or generate any errors, the job creates a text file that ends with the .rsp suffix, and puts the file in the designated folder. This file contains the responses, errors, or both.

Example: If any of the messages in the Order_102710.xml file have a response_type of D or E or generate an error response, the job creates a file named Order_102710.rsp containing the responses or errors.

Processed file: After processing each file, the job renames it using the .prcd suffix and leaves it in the designated folder.

Example: After processing the Order_102710.xml file, the job renames it Order_102710.prcd.

How often to check the folder? The job uses the Outbound delay time specified for the XMLFILE job at the Integration Layer Process Screen (Change Mode) to determine how many seconds to wait before checking the designated folder for unprocessed files. The default is 60 seconds, but you can override this default.

Starting and stopping the XMLFILE job: In addition to using the Start and End options at the Work with Integration Layer Process Queues Screen, you can use periodic functions to start and stop the XMLFILE job. See WinRetail: Periodic Functions for more information.

Note: To stop the job, you can also put a file named stop.xml in the designated folder. Since the job processes the files in alphabetical order, it processes this file last and shuts down if this file is in the folder along with the files whose names begin with InvTran_, Order_, and PORcpt_.

Troubleshooting: If the IJCT_XMLFILE_DIRECTORY_PATH property does not specify a valid path:

Starting the XMLFILE job interactively: The Work with Integration Layer Process Queues Screen displays an error when you start the job:

IJCT_XMLFILE_DIRECTORY_PATH is invalid.

Starting or stopping the XMLFILE job through a periodic function: A message such as the following is written to the CWSerenade Application Log:

IJCT XMLFILE job not started because IJCT_XMLFILE_DIRECTORY_PATH not set up for the server where the start was run.

SO16_04 OROMS 5.0 2018 OTN