com.vasoftware.sf.soap44.webservices.filestorage
Interface ISimpleFileStorageAppSoap


public interface ISimpleFileStorageAppSoap

Provides SOAP web service for uploading/downloading files. Uploaded files are assigned a "tempoary session-specific key" which must be used within the SOAP session to create a document/FRS file/etc. Otherwise, the uploaded file is simply discarded. This service is primarily meant for clients which are unable to use SOAP file attachments for uploading/downloading files. Uploading/downloading files as attachments is much more efficient than returning them in memory. The "FileStorageApp" service provides support for uploading/downloading files as attachments.

Change History
Version 4.3: No changes.

Since:
4.1

Method Summary
 void endFileUpload(java.lang.String sessionId, java.lang.String fileId)
          Closes and saves uploaded file.
 long getSize(java.lang.String sessionId, java.lang.String fileId)
          Returns size of the specified file in bytes.
 byte[] read(java.lang.String sessionId, java.lang.String fileId, int offset, int length)
          Reads from file a specified a number of bytes from the offset specified.
 java.lang.String startFileUpload(java.lang.String sessionId)
          Opens a new file descriptor for uploading.
 void write(java.lang.String sessionId, java.lang.String fileId, byte[] data)
          Appends data to the file being uploaded.
 

Method Detail

startFileUpload

java.lang.String startFileUpload(java.lang.String sessionId)
                                 throws java.rmi.RemoteException
Opens a new file descriptor for uploading.

Parameters:
sessionId - User session id.
Returns:
File descriptor key.
Throws:
com.vasoftware.sf.soap44.fault.InvalidSessionFault - when the specified session id is invalid.
com.vasoftware.sf.soap44.fault.SystemFault - when an unexpected system level error is encountered.
java.rmi.RemoteException
Since:
4.1

write

void write(java.lang.String sessionId,
           java.lang.String fileId,
           byte[] data)
           throws java.rmi.RemoteException
Appends data to the file being uploaded.

Parameters:
sessionId - User session id.
fileId - Id of the file being uploaded.
data - Data to be uploaded.
Throws:
com.vasoftware.sf.soap44.fault.InvalidSessionFault - when the specified session id is invalid.
com.vasoftware.sf.soap44.fault.SystemFault - when an unexpected system level error is encountered.
java.rmi.RemoteException
Since:
4.1

endFileUpload

void endFileUpload(java.lang.String sessionId,
                   java.lang.String fileId)
                   throws java.rmi.RemoteException
Closes and saves uploaded file.

Parameters:
sessionId - User session id.
fileId - Id of file to download.
Throws:
com.vasoftware.sf.soap44.fault.InvalidSessionFault - when the specified session id is invalid.
com.vasoftware.sf.soap44.fault.SystemFault - when an unexpected system level error is encountered.
java.rmi.RemoteException
Since:
4.1

getSize

long getSize(java.lang.String sessionId,
             java.lang.String fileId)
             throws java.rmi.RemoteException
Returns size of the specified file in bytes.

Parameters:
sessionId - User session id.
fileId - File id.
Returns:
File size in number of bytes.
Throws:
com.vasoftware.sf.soap44.fault.InvalidSessionFault - when the specified session id is invalid.
com.vasoftware.sf.soap44.fault.SystemFault - when an unexpected system level error is encountered.
java.rmi.RemoteException
Since:
4.1

read

byte[] read(java.lang.String sessionId,
            java.lang.String fileId,
            int offset,
            int length)
            throws java.rmi.RemoteException
Reads from file a specified a number of bytes from the offset specified.

Parameters:
sessionId - User session id.
fileId - File from which to read the data.
offset - Offset within file from where to read.
length - Number of bytes to read.
Returns:
Data read from the file as a byte array. Returns null on file end.
Throws:
com.vasoftware.sf.soap44.fault.InvalidSessionFault - when the specified session id is invalid.
com.vasoftware.sf.soap44.fault.SystemFault - when an unexpected system level error is encountered.
com.vasoftware.sf.soap44.fault.PermissionDeniedFault - when the
java.rmi.RemoteException
Since:
4.1