Read Large XML Files Containing Multiple Namespaces

You can use a stage file action to read a large XML file that contains multiple namespaces. You upload a ZIP archive file containing the contents. While this use case describes how to use the FTP Adapter with the stage file action, other adapters are capable of receiving an XML document as an attachment in the response (for example, the SOAP Adapter, REST Adapter, and Oracle Taleo Enterprise Edition Adapter).

The following XML example shows an export of a candidates list obtained from Oracle Taleo Enterprise Edition. The XML file has a repeating structure and contains more than one namespace in the document.
XML file with repeating structure and multiple namespaces

This use case provides a high level overview of the steps to read a large XML file with multiple namespaces in segments in an integration. Two FTP Adapters are used for downloading a large ZIP file from a remote FTP server and writing the staging file to a remote FTP server.

  1. Add an FTP Adapter to a scheduled orchestrated integration.
  2. Configure the FTP Adapter with the Download File operation and specify the input directory, file name, and ZIP file download directory.

  3. Add a stage file action to the integration and configure it as follows:
    1. On the Configure Operation page, configure the following options:
      • Select Read File in Segments from the Choose Stage File Operation list.
      • Select Yes for Configure File Reference.
      • Specify the file reference for the ZIP file downloaded from the FTP server in the Specify the File Reference section.
    2. On the Schema Options page, select XML schema (XSD) document.
    3. On the Format Definition page, configure the following options:
      • Click Browse to upload the archive of the schemas (XSDs) that represents the message structure.
      • Select the root element that contains the repeated element.

      • Click the Edit icon to select the repeating batch element in the Expression Builder.

      The Summary page looks as follows.
      Description of ftp_stage_file_sum.png follows
      Description of the illustration ftp_stage_file_sum.png

  4. Add a second stage file action to write the records in comma-separated value (CSV) format.
    1. On the Configure Operation page, configure the following options:
      • Select Write File from the Choose Stage File Operation list.
      • Specify the file name of the CSV file in the Specify the File Name section.
      • Specify the output directory in the Specify the Output Directory section.
      • Select the Append to Existing File checkbox.
    2. On the Schema Options page, select Sample delimited document (e.g. CSV).
    3. On the Format Definition page, configure the following options:
  5. Perform the mapping between the two stage file actions.
    Integration shows a stage file action, followed by a mapper, followed by a second stage file action.

  6. Add a second FTP Adapter to write the staging file to an output directory on a remote FTP site.

  7. Design the remaining parts of the integration.