Use a Stage File Write Operation with an Opaque Schema

You can use an opaque schema in a stage file action Read File or Write File operation without concern for a schema for the file. The only condition is that whatever is sent to the opaque element in the opaque schema must be base64-encoded data.

For the following use case:
  • The integration downloads a zip file using the FTP Adapter Download File operation and extracts and processes each file.
  • The files are staged temporarily in Oracle Integration using a stage file action List Files operation.
  • The files are iterated over using a for-each action.
  • The files are written to a staged directory using a stage file action Write File operation with an opaque schema.
  • The files are written to an output directory using the FTP Adapter Write File operation.
  1. Add a stage file action to an integration. See Configure a Stage File Action.
  2. On the Configure Operation page, select the Write File operation and specify the file name and output directory.
  3. On the Schema Options page, select XML schema (XSD) document.
  4. On the Format Definition page, make the following selections.
    1. Select a new file (for this example, opaque_schema.xsd is selected).
      The contents of the XSD file are as follows for this example:
      <?xml version = '1.0' encoding = 'UTF-8'?>  
      <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
                  xmlns="http://www.w3.org/2001/XMLSchema" >
            <element name="opaqueElement" type="base64Binary" />
          </schema>
    2. Select the schema element (for this example, opaqueElement is selected).
  5. Map the FileReference of the for-each repeating element (ICSFile) to opaqueElement of StageFileWrite using an encodeReferenceToBase64 function.