Handling Incoming XML Errors


Datafile Software

Handling Incoming XML Errors


In a well-ordered XML world, incoming XML files will not be the cause of any errors. Sales orders, for example, should not include data elements unknown to the template; orders will quote locations and products already known to you; purchase invoices will correctly refer to your original purchase orders; XML file totals will match the batch totals. The vast majority of XML files will give you no problems.

Unfortunately, the real world throws up surprises, particularly when starting to trade with a partner with whom you have not exchanged XML messages before. For this reason it is always recommended that XML received from new partners are first processed using the Pre-Process flag, so that you can check — before any live application files are updated — that the incoming XML file does not display any error conditions.

Should errors be reported, then the place to start is from the audit trail. This records the error(s) found, noting the filename(s), and often highlights the problem immediately. The next stage may well be to examine the error file for the XML file concerned. (If you have not requested error files, start doing so by changing the XML definition.)

If the XML file did not cause any records to be created or updated, then you might want to recover the XML file from the archive and — after making whatever changes were shown to be necessary in the rest of the system — reprocess the input XML file.

Normally it is not possible to reprocess the XML file, and the data from it will have to be entered manually. This will probably require that you print the XML file, marking those records within it that were and were not processed. If there are batch totals, then it is recommended that you check from the audit report that the value of successfully processed input data matches the total of records that you have marked as successfully processed. In a like manner, check that the total of records that you enter manually does match those from the XML file.

If you have a browser that includes XML schemas and style sheets for the XML files that you are processing, then the XML file can be displayed as documents that can be used as data input documents; otherwise you’ll have to work from an XML file print (see Diagnostic XML File Print below).
Custom Fields

Article ID: 1758
Created On: Thu, Jul 5, 2012 at 3:53 PM
Last Updated On: Thu, Jun 22, 2023 at 5:02 PM

Online URL: https://kb.datafile.co.uk/article/handling-incoming-xml-errors-1758.html