Fetch Document from SMS

This functionality retrieves a document from the SMS Server. There are different methods - one method retrieves the complete document in a file whose path is specified by the userUser, another method retrieves the complete document in a buffer and yet another method retrieves a specified pPage of the document in a buffer.

 

Usage in Visual C++/Visual Basic Application

Usage in Java Application

Error

 

Usage in Visual C++/Visual Basic Application

Prototype

int WINAPI NGISGetDocInFile( LPTSTR cabinetName, LPISINDEX isIndex,

        LPTSTR userIndex, LPTSTR fileName,

                      LPTSTR siteName

      )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

isIndex

A pointer to a variable of type ISINDEX. The structure ISINDEX contains information (viz. namely, indexIndex of the volumeVolume in which the document document is added and the indexIndex of the document in that volumeVolume) about the document that is to be fetched.

 

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

fileName

Full Path of the file in which the document data will be fetched.

Not null

Input Parameter

siteName

Name of the sSite from where the document is fetched.

N/A

Output Parameter

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.

 

Prototype

int WINAPI NGISGetDocInFile_MT ( CSocket * m_pSock, LPTSTR siteAddress, short portId,

                                                                 LPTSTR cabinetName, short siteId, short m_sVolumeId,

 int m_nDocIndex, LPTSTR userIndex,

 LPTSTR fileName, LPTSTR siteName

                            )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

m_pSock

A pointer to a variable of type Csocket, which that encapsulates a sSocket Oobject to the JTS.

A valid socket connection to JTS

Input Parameter

siteAddress

IP aAddress on which the JTS sServer is running.

IP aAddress where JTS running

Input Parameter

portId

Port on which JTS Server is running.

short>0

Input Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

siteId

Index of the sSite from where the document is to  fetchbe fetched. the document. This is significant in case of replication of volumeVolume at different sitesSites. User can give   the S siteIid of the local sSite where volumeVolume of a rRemote sSite is replicated, in order for fast retrieval.

short > 0

Input Parameter

m_sVolumeId

Index of volumeVolume in which document is present in  the SMS Server.

short>0

Input Parameter

m_nDocIndex

Index of the document in volumeVolume.

int>0

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

Null

Input Parameter

fileName

Full path of file in which Image Server will bring retrieve full data of the document.

Not null

Input Parameter

siteName

Name of the site Site from where  the document is fetched.

N/A

Output Parameter

 

Output Parameters

This method returns an integer which will be 1 in case of success else an error code will be returned.

 

Prototype

int WINAPI NGISGetPage ( LPTSTR cabinetName, LPISINDEX isIndex, LPTSTR userUserIndex,

                                                 short pageNo, TCHAR ** buf

      )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

isIndex

A pointer to a variable of type ISINDEX . The structure ISINDEX contains information (viz. namely, indexIndex of the volumeVolume in which the document is added and the indexIndex of the document in that volumeVolume) about the document, which that is to be fetched.

 

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

pageNo

Page nNumber of the document that needs is to be fetched from  the SMS Server.

int >0

Input Parameter

buf

Output Parameter buffer in which page data is returned.

N/A

Output Parameter

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.

 

Prototype

int WINAPI NGISGetPageInFile_MT ( CSocket * m_pSock, LPTSTR siteAddress, short portId,

                                LPTSTR cabinetName, short siteId, short m_sVolumeId,

                                int m_nDocIndex, LPTSTR userUserIndex, short pageNo,

                                LPTSTR fileName

                              )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

m_pSock

A pointer to a variable of type CSocket, which that encapsulates a socket Socket object Object to the JTS.

A valid socket connection to JTS

Input Parameter

siteAddress

IP aAddress on which the JTS sServer is running.

IP address where JTS running

Input Parameter

portId

Port on which the JTS Server is running.

short>0

Input Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

siteId

Index of site the Site from where the document is to be fetched. to fetch the document. This is significant in case of replication of volumeVolume at different sSites. User can give   the sSiteiId of the local sSite where volumeVolume of a rRemote sSite is replicated, in order for fast retrieval.

short > 0

Input Parameter

m_sVolumeId

Index of volumeVolume in which document is present in the SMS Server.

short>0

Input Parameter

m_nDocIndex

Index of the document in volumeVolume.

int>0

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

pageNo

Page number Number of the document that needs to be fetched from the SMS Server.

short  >0

Input Parameter

fileName

Full path of file in which Image Server will bringretrieve page data of document.

Not null

Input Parameter

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.

 

 

Usage in Java Application

 

Prototype

public int JPISGetDocInFile( String cabinetName, JPISIsIndex isIndex,

                                           String docFileName, JPDBString siteName

                                                )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not null

Input Parameter

isIndex

An object of type JPISIsIndex, whichthat contains information (viz. namely, indexIndex of the volumeVolume in which the document is added and the indexIndex of the document in that volumeVolume) about the document to be fetched.

 

Input Parameter

docFileName

Full Path of the file in which the document data will be fetched.

Not null

Input Parameter

siteName

Name of the sSite from where the document is fetched.

N/A

Output Parameter

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.

 

Prototype

public int JPISGetPage (  String cabinetName, JPISIsIndex isIndex, String userUserIndex ,

             int pageNumber, ByteArrayOutputStream buf

          )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

isIndex

An object of type JPISIsIndex, whichthat contains information (viz. namely, indexIndex of the volumeVolume in which the document is added and the indexIndex of the document in that volumeVolume) about the document to be fetched.

 

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

pageNumber

Page nNumber of the document that needis to be fetched from the m SMS Server.

int > 0

Input Parameter

buf

Output Parameter buffer in which page data is returned.

N/A

Output Parameter

 

Output Parameters

This method returns an integer which will be 1 in case of success else an error code will be returned.

 

Prototype

public int JPISGetPage_MT ( JtsConnection jtsCon, String jtsAddress, short portId,

    String cabinetName, short siteId, short volumeId,

    int docIndex, String userUserIndex, int   pageNumber,

    ByteArrayOutputStream buf

  )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

JtsCon

This object holds a connection to the JTS Server. However, it can be sent as null, as a new socket connection to JTS using second two parameters (jtsAddress and portId) is created inside the function when the parameter is sent as null.

Object of class JtsConnection having a connection to JTS

Input Parameter

JtsAddress

IP aAddress on which the JTS sServer is running.

IP address where JTS running

Input Parameter

portId

Port on which JTS is running.

short>0

Input Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

siteId

Index of the sSite from where the document is to be fetched. to fetch the document. This is significant in case of replication of volumeVolume at different sSites. User can give   the sSiteiId of the local sSite where volumeVolume of a rRemote sSite is replicated, in order for fast retrieval.

short > 0

Input Parameter

volumeId

Index of volumeVolume in which document is added intto the SMS
Server
.

short>0

Input Parameter

docIndex

Index of the document in the volumeVolume of SMS Server.

int>0

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

pageNumber

Page nNumber of the document that needs to be fetched from the SMS Server.

int > 0

Input Parameter

buf

Output Parameter buffer in which page data is returned.

N/A

Output Parameter

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.

 

Prototype

public int JPISGetDocInFile_MT (  JtsConnection jtsCon, String jtsAddress, short portId,

            String cabinetName, short siteId, short volumeId,

                          int docIndex, String userUserIndex, OutputStream buf,

                          JPDBString oSiteName

          )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

JtsCon

This object holds a connection to the JTS. However, it can be sent as null, as a new socket connection to JTS using second two parameters (jtsAddress and portId) is created inside the function when the parameter is sent as null.

Object of class JtsConnection having a connection to JTS

Input Parameter

JtsAddress

IP aAddress on which the JTS server is running.

IP aAddress where JTS running

Input Parameter

PortId

Port on which port JTS is running.

short>0

Input Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

SiteId

Index of the Ssite from where the document is to be fetched. to fetch the document. This is significant in case of replication of volumeVolume at different sSites. User can give   the sSiteIid of the local sSite where volumeVolume of a rRemote sSite is replicated, in order for fast retrieval.   

short > 0

Input Parameter

VolumeId

Index of the volumeVolume in which document is added into the SMS Server.

short>0

Input Parameter

DocIndex

Index of the document in volumeVolume.

int>0

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

Buf

This is output stream in which document data is returned.

N/A

Output Parameter

oSiteName

Name of the sSite from where document is fetched.

N/A

Output Parameter

 

Output Parameters

This method returns an integer which will be 1 in case of success else an error code will be returned.

 

Prototype

public int JPISGetDocInFile_MT ( JtsConnection jtsCon, String jtsAddress, short portId,

                                                       String cabinetName, short siteId, short volumeId,

                                                       int docIndex, String userUserIndex, String docFileName,

                                                       JPDBString oSiteName

  )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

jtsCon

This object holds a connection to the JTS. However, it can be sent as null, as a new socket connection to JTS using second two parameters (jtsAddress and portId) is created inside the function when the parameter is sent as null.

Object of class JtsConnection having a connection to JTS

Input Parameters

jtsAddress

IP aAddress on which the JTS server is running.

IP aAddress where JTS running

Input Parameters

portId

Port on which port JTS is running.

short>0

Input Parameters

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameters

siteId

Index of the sSite from where the document is to be fetched. to fetch the document. This is significant in case of replication of volumeVolume at different sSites. User can give   the sSiteIid of the local sSite where volumeVolume of a rRemote sSite is replicated, in order for fast retrieval.   

short > 0

Input Parameters

volumeId

Index of volumeVolume in which document is added into the SMS.

short>0

Input Parameters

docIndex

Index of the document in volumeVolume.

int>0

Input Parameters

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameters

docFileName

Full path of file in which Image Server will bring full data of document.

Not null

Input Parameters

oSiteName

Name of the site from where document is fetched.

N/A

Output Parameters

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.