- General Information
- Connecting Third-party Systems
- crossConnect for content systems
- crossConnect for External Editing
- Purpose and usage
- Requirements
- Implementation
- Across XLIFF format
- Across-specific Extensions
- <xliff> Element Attributes
- <file> Element Extensions
- <trans-unit> Element Extension
- Paragraph States
- Paragraph State Flags
- <source> and <target> Element Content
- <bpt> Element Attributes
- <ph> Element Attributes
- <x> Element Attributes
- Across-specific Properties
- Analysis Results
- Sample Files
- Across XLIFF - import, export and segmentation
- Context information
- Exporting best matches in Across XLIFF
- Hyperlinks to XLIFF
- Secure file handling with C#
- Secure file handling with JAVA
- Workflow and vendor configuration
- Sample code - Integrated solution
- Across XLIFF format
- Generic File Connector
- Display Texts
- APIs
- APIs - Technology
- crossTank API v1
- crossTank API v2
- crossTerm API v1
- crossTerm API v2
- crossAPI SI
- Requirements
- Function Return Types
- crossAPI SI and Java
- List of Objects in crossAPI SI
- Sample - transferring checkout files via FileManager
- Sample - VBS
- Text Preprocessing API
FileManager
- Unless stated otherwise, all objects are available in the following Across versions:
- 5.7
- 6.0
- 6.3
- 7.0
Function-specific return values are listed with each function.
For more information on return values and a complete list of error codes, see Function Return Types.
Function | Description |
Appends binary data at the end of a file stream. | |
Creates a file stream on the server. | |
Returns the contents of the specified file. | |
Returns the contents of the specified file. | |
Returns the GUID of a temporary file on the server. This path can be used for example by CheckOutManager.CreateCheckOutJob. | |
Returns the path that corresponds to the supplied FileGUID. This path is most likely not accessible from the caller and can therefore be used only for passing it to functions that require a path. | |
Reads binary data from a file stream. | |
Removes a file from the server that has been sent to it or that has been created previously. | |
Sends a file to the crossAPI SI server. The file is then locally stored and can be used in subsequent calls to any function that requires a path to a file. | |
Writes binary data into a file stream. |
FileManager.AppendToFileStream
Appends binary data at the end of a file stream.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileGUID | The GUID of the file stream. |
3 | object | BinaryData | The data to write in the file. |
Return Values
Result | Type/Value | Interpretation |
Success | Is always empty. | |
Error | 70 | Cannot open file. |
Error | 71 | File not found. |
FileManager.CreateFileStream
Creates a file stream on the server.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileName | The name of the file. |
Return Values
Result | Type/Value | Interpretation |
Success | string | Returns the GUID of the file. |
Error | 70 | Cannot open file. |
This function creates a temporary file on the server with the provided content. It must be deleted by RemoveFileFromServer after it is no longer needed.
To safe disk space, any temporary files are cleaned up when the Across Language Server services are restarted.
FileManager.GetFileFromServer
Returns the contents of the specified file.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileGUID | The GUID of the file which should be returned. |
Return Values
Result | Type/Value | Interpretation |
Success | object | The binary contents of the file. |
Error | 70 | Cannot open file. |
Error | 71 | File not found. |
Error | 177 | File is empty. |
The file GUID is returned when a file is sent to the server or a temporary file is created on the server. See FileManager.SendFileToServer and FileManager.GetGuidOfTemporaryFileName.
FileManager.GetFileSize
Returns the contents of the specified file.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileGUID | The GUID of the file which should be returned. |
Return Values
Result | Type/Value | Interpretation |
Success | long | The length of the file. |
Error | 70 | Cannot open file. |
Error | 71 | File not found. |
The file GUID is returned when a file is sent to the server or a temporary file is created on the server. See FileManager.SendFileToServer and FileManager.GetGuidOfTemporaryFileName.
FileManager.GetGuidOfTemporaryFileName
Returns the GUID of a temporary file on the server. This path can be used for example by CheckOutManager.CreateCheckOutJob.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | Extension | The extension that should be used for the file on the server. |
Return Values
Result | Type/Value | Interpretation |
Success | string | Returns the GUID of the file. |
Error | 70 | Cannot open file. |
This function creates an empty temporary file on the server. It must be deleted by RemoveFileFromServer after it is no longer needed.
FileManager.GetPathToFile
Returns the path that corresponds to the supplied FileGUID. This path is most likely not accessible from the caller and can therefore be used only for passing it to functions that require a path.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileGUID | The GUID of the file for which the path should be returned. |
Return Values
Result | Type/Value | Interpretation |
Success | string | The server local path to the file. |
Error | 71 | File not found. |
The file GUID is returned when a file is sent to the server or a temporary file is created on the server. See FileManager.SendFileToServer and FileManager.GetGuidOfTemporaryFileName.
FileManager.ReadFromFileStream
Reads binary data from a file stream.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileGUID | The GUID of the file stream. |
3 | long | Position | The start position in the file stream. |
4 | long | Length | The amount of bytes to read. |
Return Values
Result | Type/Value | Interpretation |
Success | byte[] | An array of bytes containing the binary data of the file. |
Error | 70 | Cannot open file. |
Error | 71 | File not found. |
Error | 177 | File is empty. |
Error | 182 | Requested position is larger than the size of the file. |
Error | 183 | Error during file operations. |
FileManager.RemoveFileFromServer
Removes a file from the server that has been sent to it or that has been created previously.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileGUID | The GUID of the file which should be removed. |
Return Values
Result | Type/Value | Interpretation |
Success | Is always empty. | |
Error | 71 | File not found. |
The file GUID is returned when a file is sent to the server or a temporary file is created on the server. See FileManager.SendFileToServer and FileManager.GetGuidOfTemporaryFileName.
FileManager.SendFileToServer
Sends a file to the crossAPI SI server. The file is then locally stored and can be used in subsequent calls to any function that requires a path to a file.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | object | BinaryData | The data to write in the file. |
3 | string | FileName | The name of the file. |
Return Values
Result | Type/Value | Interpretation |
Success | string | The GUID of the file. |
Error | 70 | Cannot open file. |
This function creates a temporary file on the server with the provided content. It must be deleted by RemoveFileFromServer after it is no longer needed.
To safe disk space, any temporary files are cleaned up when the Across Language Server services are restarted.
In order to send bigger files to the server, please change the value of
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSOAP\30\SOAPISAP]
MaxPostSize to 0xA00000
(or the entry in the according wow6432node)
The crossAPI implementation of the SOAP interface was changed with Across v7.0 11332. For newer versions of Across, please check the following section of the web.config for the crossAPI service (C:\Program Files (x86)\Across\crossWeb\web.config):
<bindings> <basicHttpBinding> <binding maxReceivedMessageSize="1048576" /> </basicHttpBinding> <basicHttpsBinding> <binding maxReceivedMessageSize="1048576" /> </basicHttpsBinding> </bindings>
The value for maxReceivedMessageSize specifies the maximum allowed size of the SOAP message in bytes. The values must be a positive integer.
(Max. value: 2147483647 - note: this is 1 byte short of 2GB)
Please note that the value is officially a 64-bit integer, but we found that configuring a value higher than the value mentioned before results in an Argument out of range exception when parsing the configuration.
FileManager.WriteToFileStream
Writes binary data into a file stream.
Parameters
Type | Name | Description | |
1 | string | ST | A security token for use in other crossAPI SI functions. |
2 | string | FileGUID | The GUID of the file stream. |
3 | int | Position | The writing start position in the file stream. |
4 | object | BinaryData | The data to write in the file. |
Return Values
Result | Type/Value | Interpretation |
Success | Is always empty. | |
Error | 70 | Cannot open file. |
Error | 71 | File not found. |
The data can be given in a byte array.
Please note that the byte array has to fit the data exactly. All data in the passed array will be written to the file.So filling up the remaining bytes in the buffer with 00 when the buffer is too large for the data will not work. The padding will be written to the file, potentially corrupting it.