RAW: Difference between revisions

From Commander4j
Updated by push_wiki.py
 
Line 1: Line 1:
[[Category: Middleware4j]]
The RAW connector copies or moves files from one location to another without any format conversion, transformation, or interpretation of the file contents. Unlike other [[Connectors|connectors]], it does not convert the file into an internal XML representation — the bytes are passed through unchanged.
The RAW connector is special. It's provided to enable the middleware to copy/move files without any kind of modification or interpretation. This is more efficent than using a different kind of connector.


The other connectors will load the input file and convert into a XML representation so you can apply XSL transformations and convert into different file formats. This has a memory and cpu overhead.
== When to Use RAW ==


The RAW connector bypasses this step and just moves the file.
Use the RAW connector when you need to:


You might to this if you want to poll and remote file share and move files to a local folder for import into an application without modification.
* Transfer files between directories or network shares without modifying them
* Monitor a remote file share and pull files to a local directory for processing by another application
* Replicate files to multiple destinations simultaneously
* Move large or binary files efficiently (no XML overhead)
 
Because RAW bypasses the XML conversion step, it uses significantly less memory and CPU than other connector types — making it the right choice whenever transformation is not required.
 
== Input Configuration ==
 
<syntaxhighlight lang="xml">
<input>
  <id>in1</id>
  <type>RAW</type>
  <url>
    <path>./interface/input/Map07 RAW to RAW</path>
    <mask/>
    <pollingInterval>5000</pollingInterval>
  </url>
</input>
</syntaxhighlight>
 
No XSLT stylesheet can be applied to a RAW input, as the file is not converted to XML.
 
== Output Configuration ==
 
<syntaxhighlight lang="xml">
<output>
  <id>out1</id>
  <type>RAW</type>
  <url>
    <path>./interface/output/Map07 RAW to RAW</path>
  </url>
</output>
</syntaxhighlight>
 
=== Multiple Output Paths ===
 
The output path can include multiple destinations separated by semicolons. The file will be written to all specified paths:


=RAW Map Configuration=
'''config.xml'''
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
      <map>
<path>./interface/output/Map07 Path1;./interface/output/Map07 Path2;\\server\share\output</path>
        <id>Map07</id>
        <enabled>true</enabled>
        <description>RAW File Copy</description>
        <enableEmailNotifications>true</enableEmailNotifications>
        <connectors>
            <input>
              <id>in1</id>
              <description>Read RAW Input</description>
              <type>RAW</type>
              <url>
                  <path>./interface/input/Map07 RAW to RAW</path>
                  <mask/>
                  <prefix/>
                  <pollingInterval>5000</pollingInterval>
              </url>
            </input>
            <output>
              <id>out1</id>
              <enabled>true</enabled>
              <description>Write RAW Output</description>
              <type>RAW</type>
              <url>
                  <path>./interface/output/Map07 RAW to RAW Copy 1;./interface/output/Map07 RAW to RAW Copy 2</path>
                  <prefix/>
                  <fileExtension/>
                  <use83GUID>false</use83GUID>
              </url>
            </output>
        </connectors>
      </map>
</syntaxhighlight>
</syntaxhighlight>
== Notes ==
* No XSLT transformation is possible with RAW connectors — the data is not parsed.
* The RAW connector supports UNC network paths (<code>\\server\share\path</code>) as well as local paths, making it suitable for file distribution across a network.
* Polling interval can be set longer than other connector types (e.g. 5000 ms) since RAW operations are lightweight.
See also: [[Connectors]], [[Maps]], [[Overview_Middleware4j]]
[[Category:Middleware4j]]

Latest revision as of 12:17, 1 April 2026

The RAW connector copies or moves files from one location to another without any format conversion, transformation, or interpretation of the file contents. Unlike other connectors, it does not convert the file into an internal XML representation — the bytes are passed through unchanged.

When to Use RAW

Use the RAW connector when you need to:

  • Transfer files between directories or network shares without modifying them
  • Monitor a remote file share and pull files to a local directory for processing by another application
  • Replicate files to multiple destinations simultaneously
  • Move large or binary files efficiently (no XML overhead)

Because RAW bypasses the XML conversion step, it uses significantly less memory and CPU than other connector types — making it the right choice whenever transformation is not required.

Input Configuration

<input>
  <id>in1</id>
  <type>RAW</type>
  <url>
    <path>./interface/input/Map07 RAW to RAW</path>
    <mask/>
    <pollingInterval>5000</pollingInterval>
  </url>
</input>

No XSLT stylesheet can be applied to a RAW input, as the file is not converted to XML.

Output Configuration

<output>
  <id>out1</id>
  <type>RAW</type>
  <url>
    <path>./interface/output/Map07 RAW to RAW</path>
  </url>
</output>

Multiple Output Paths

The output path can include multiple destinations separated by semicolons. The file will be written to all specified paths:

<path>./interface/output/Map07 Path1;./interface/output/Map07 Path2;\\server\share\output</path>

Notes

  • No XSLT transformation is possible with RAW connectors — the data is not parsed.
  • The RAW connector supports UNC network paths (\\server\share\path) as well as local paths, making it suitable for file distribution across a network.
  • Polling interval can be set longer than other connector types (e.g. 5000 ms) since RAW operations are lightweight.

See also: Connectors, Maps, Overview_Middleware4j