RISE to Bloome Software
Log In    
Home
RISE
Marshal
Download
 
 
r2bsoftware.se r2bsoftware.se
 
 
 
Click to hide navigation tree

The IExport Interface

IExport exposes the three methods Begin, Read and End. The interface is used to execute Marshal jobs and to retrieve the exported files independent of how many they are or how large they are. Call the Begin method to execute the export job. Call the Read method repeatedly as long as there is data to retrieve and finally, call the End method to release any resources used by the web service.
 
Please, note that although the IExport interface is technically a part of the Marshal Integrator, productwise it is a part of the Marshal Archiver. This means that in order to use this interface, your models must be published using Marshal Archiver licenses.
 

The Begin Method

Call the Begin method to execute the Marshal Job and to initialize the retrieval of the exported data.
 
public exportBegin Begin(string marshalStructureName, string exportFilter, string customExportHeader, int bufferLength, bool executeImport)
 
Parameter name
Description
marshalStructureName
The name of the Marshal model to execute. (The name as it appears in the Marshal Repository)
exportFilter
If you wish, you can supply an export filter to limit the amount of data returned. The filter will be passed to the top level query harvester of the Marshal model. You can read more about how to use export filters with the harvester in use.
customExportHeader
Marshal allows you to add your own custom header elements to the export files. Custom headers can help users and applications to understand what the export contains. Typical export headers could describe which system has been exported and the purpose of the export.
bufferLength The maximum number of bytes returned in one chunk.
executeImport
If your Marshal model contains Inport rules, you can choose to execute these. You can read more about import rules in the Import article.
 

Return value

The method returns an exportBegin struct.
 
public struct exportBegin
{
    public string Session;
    public int NumberOfChunks;
    public string RootDir;
}
 
Member name
Description
Session
A session identifier for the job. The session must be passes in the subsequent calls to the Read and End Methods.
NumberOfChunks
The number of times the Read method must be called to retrieve the exported files.
RootDir
The name of the root directory for the export.  
 
 
 

The Read Method

Call the Read method to read one chunk of data. The Read method never returns more than one export file. If a file is too large to be retrieved in one chunk, the file is devided into multiple chunks.
 
public exportRead Read(string session)
 
Parameter name
Description
session
A session identifier for the job. Supply the session returned by the Begin method.

 

Return value

The method returns an exportRead struct.
 
public struct exportRead
{
    public int ChunksRemaining;
    public byte[] Buf;
    public string FileName;
    public bool EndOfFile;
    public bool EndOfExport;
}
 
Member name
Description
ChunksRemaining
The number of times the Read method must be called to retrieve the remainder of the exported files.
Buf
The actual data (file content). The buffer never contains data from more than one file.
FileName The name of the file currently being retrieved.
EndOfFile A flag indicating if the entire file has been retrieved.
EndOfExport
A flag indicating if the last file of the export has been retrieved.
 
 
 

The End Method

Call the End method to release any resources allocated by the web service.
 
public void End(string session)
 
Parameter name
Description
session
A session identifier for the job. Supply the session returned by the Begin method.