How to use Configuration API

 

Omnidocs Engine provides a standard function using which any of the components of Omnidocs Engine can be configured.

 

Sample call to Associate a new cabinet on JTS using Configuration API.

 

If the user wants to associate a new cabinet on JTS following steps are to be followed.

 

1.       Import Omnidocs engine configuration package

import com.newgen.dmsconfigapi.*;

 

2.       Make the inputXml for Associate Cabinet

String strInputXml = “<?xml version=\"1.0\"?>

<AssociateCabinet_Input>

                <AdminOption>AssociateCabinet</AdminOption>

                <CabinetInfo>

                                <CabinetName>newcab</CabinetName>   

                                <UserName>postgres</UserName>

                                <USerPassword>postgres</UserPassword>

                                <MaxDBConnections>5</MaxDBConnections>

                                <MinDBConnections>1</MinDBConnections>

                                <Querytimeout>0</Querytimeout>

                                <CabinetType>B</CabinetType> 

                                <DatabaseType>postgres</DatabaseType>

                                <IP>192.168.5.116</IP>

                                <Port>5432</Port>

                                <Service></Service>

                </CabinetInfo>

</AssociateCabinet_Input>”

 

3.       Use the excuteCall method of DMSConfig class to execute this XML on JTS

DMSConfig dmsConfig = new DMSConfig ();

String strOutputXml = dmsConfig.executeCall(strInputXml,   strJtsIp, strJtsAdminPort);

 

where

strOutputXml – is the output xml returned from the server.

strJtsIp  - is the ip of the server on which JTS is running.

strJtsPort – is the admin port of JTS server