iServer configuration file introduction

Feedback


The main configure information is in \webapps\iserver\WEB-INF. See Catalog introduction after installing.

 

Configuration file introduction

WEB-INF stores server information and configuration information. The structure of the folder is as follows:

including:

The main contents of each configuration file are as follows:

Contents of Configuration File

File Name Description
iserver-datacatalog.xml The configuration file of data catalog service, including the config of data storage and other config infos.
iserver-log4j.properties The configuration file for log.
iserver-rest-appContext.xml REST configuration file that defines the mapping relations between representation types and URI suffix.
iserver-rest-resources.xml The resource configuration file for extensive resources. Users can specify the extensive name, URI, type, representation encoder name, parser name, etc.
iserver-services-interfaces.xml Service interface instance, including the interface instances which are used by iserver-services-samples.xml and iserver-services-user.xml, such as : rest, restjsr, wms111, wms130, wfs100, wmts100, wmts-china, wcs111, wcs112, handler, gspserver.
iserver-services-samples.xml The configure information of the sample service.
iserver-services.xml The configure information of services published by users When you name this file with a prefix "iserver-services", the server can recongnise it as an configuration file for its own. You can set multi customized service configuration file, such as: iserver-services-1.xml, iserver-services-2.xml.
iserver-services-buildin.xml The config infos of iServer built-in services.
iserver-system.xml Sytem level configuration for SuperMap iServer, including meta information, cluster, kml style configurations, etc.
web.xml Initialization configuration file for SuperMap iServer, which defines the mapping relations between functions and classes.
iserver-security.db A database is used to store the information of users and roles
iserver-services.db A database is used to store the information of service authorization.

Service configuration file

All the configuration information is stored in service configuration files. iserver-services-interface.xml is for service interface configuration; iserver-services-samples.xml is for sample services configuration; iserver-services.xml is for the services published by users. The latter two are similar in structure, so this does not go into details.

Through these files, you can:

Service interface configuration File

The service interface configuration file, iserver-services-interface.xml, includes service interface instances. The root node is <application> element, and its subnode is <interfaces> element. And each interface element is used to configure a specific service interface with the following properties:

Sample service instance configuration file

The sample service instance configuration file, iserver-services-samples.xml, includes configuration information of sample services supported by SuperMap iServer. The root node is <application> element, and it has following subnodes:

1. <components>

Each component is used to configure a specific service component.

2. <providers>

Each provider element is used to configure a specific service provider.

3. <componentSets>

Each componentSet element is used to configure a service component set. Each component set can reference multiple service components.

4. <providerSets>

Each providerSet element is used to configure a service provider set. Each provider set can reference multiple service providers.

Built-in service cofiguration file

The built-in service configuration file iserver-services-buildin.xml includes the config info of geometry service offered by iServer. The root node is <application>, which includes the following child nodes:

1. <componentSets>

Each componentSet element in componentSets is used to configure a set of service components, one componentSet can reference multiple service components.

2. <providerSets>

Each providerSet element in providerSets is used to configure a set of service providers, one providerSet can reference multiple service providers.

3. <components>

Each component element in components is used to configure a specific service component, including:

4. <providers>

Each provider element in providers is used to configure a specific service provider, including:

System configuration file

iserver-sytem.xml contains the system configuration information. The root node is <server> lement. <server> node currently mainly includes <properties>, <management>, <hosts>, <clustering>, <harLog>, <queryFilter> subnode elements.

1. <properties> element

Used to configure global sytem properties information for SuperMap iServer, such as service default outputPath, outputSite, whether check enviroment or not:

Among them, the global properties: outputPath, outputSite can also be set through iServer WebManager. Please refer to Global Properties Setting.

2. <management> element

The <management> element is used to configure the metadata information of SuperMap iServer . The metadata information of service component types (<component-types>), service provider types (<provider-types>) and service interfaces (<interface-types>) are included.

Examples of security configuration nodes are as follows:

    <security> 
      <accessControl> 
        <SecuritySetting> 
          <isSecurityEnabled>true</isSecurityEnabled>
          <cacheInfoToMemory>true</cacheInfoToMemory>
          <tokenKey>4da7ef8f2e734f56ab2ecfae20cce49a</tokenKey> 
          <!-- Password anti-violence crack settings -->
          <passwordProtectedSetting> 
            <passwordDiffCount>5</passwordDiffCount>  
            <userPasswordErrorCounterSetting> 
              <passwordErrorProtectEnable>false</passwordErrorProtectEnable>  
              <lockedTime>1200000</lockedTime>  
              <periodLength>600000</periodLength>  
              <allowFailCountPerPeriod>5</allowFailCountPerPeriod> 
            </userPasswordErrorCounterSetting> 
          </passwordProtectedSetting> 
          <!-- Security information storage configuration -->
          <storage class="com.supermap.server.config.SQLSecurityInfoStorageSetting"> 
            <type>MYSQL</type>  
            <connInfo> 
              <username>root</username>  
              <password>super123.</password>  
              <dbType>MYSQL</dbType>  
              <driverClass>com.mysql.jdbc.Driver</driverClass>  
              <jdbcUrl>jdbc:mysql://192.168.120.44:3306/supermap?useUnicode=true&characterEncoding=UTF-8</jdbcUrl>  
              <maxPoolSize>30</maxPoolSize>  
              <initialPoolSize>5</initialPoolSize>  
              <minPoolSize>5</minPoolSize>  
              <maxIdleTime>0</maxIdleTime>  
              <maxWait>3000</maxWait> 
            </connInfo> 
          </storage> 
          <!-- Session storage configuration -->         
<session class="com.supermap.server.config.RedisSessionSetting"> <session class="com.supermap.server.config.RedisSessionSetting"> <type>Redis</type> <host>127.0.0.1</host> <port>6379</port> <maxActive>1024</maxActive> <maxIdle>200</maxIdle> <maxWait>10000</maxWait> <timeout>10000</timeout> <testOnBorrow>true</testOnBorrow> </session> </SecuritySetting> </accessControl> </security>

Among them, <isSecurityEnabled>is used to enable or disable the security control; <tokenKey> is used to set the share key of Token; <cacheInfoToMemory> is used to set whether save all user info in memory,and get the information from memory.The default is true,which represents saving all user info in memory.If there is a large number of users,you are advised to set it to false,which represents the user info can be get from database in real time,because there will need to a large amount of SQL query,which can cause the performance to slow down;<passwordProtectedSetting> is used to protect password from cracking violently, specific parameters include:

<storageSetting> is used to set the storage location of security information, including <type> field and <connInfo> field. <type> is used to set the database storage type, and currently supports SQLITE, MYSQL. <connInfo> is used to configure the connection information of database. Take the MYSQL database as an example, the connection information specific parameters include:

<Session> is used to specify the storage location of the session information, including the Redis database connection pool configuration. Specific parameters are as follows:

 

3. <hosts> element

The <host> element is used to configure the host of SuperMap iServer. There can be multiple <host> elements. A host example is as follows:

<host port="8090" type="webapp" uriBase="/services">
        <interface-type>com.supermap.services.wms.WMSServlet</interface-type>
        <interface-type>com.supermap.services.rest.RestServlet</interface-type>
        <interface-type>com.supermap.services.wfs.WFSServlet</interface-type>
        <interface-type>com.supermap.services.wmts.WMTSServlet</interface-type>
</host>

The subnode of <host>, <interface-type>, indicates the type of service contained in the service host; The attributes of <host> have the following meanings:

4. <clustering> element

Including applications such as cluster configuration.. For more information about the elements of cluster subnodes, refer to using the configuration file to manage cluster which is under the cluster configuration topic .

5. <harLog> element

It used to configure the service access logs, such as whether to enable the service access log, the file name of service access log, the settings of service URI address:

6. <queryFilter> element

It is used in the SQL query filter configuration to prevent SQL injection. SQL injection means to insert the strings that illegal or go against the user wishes into SQL query expression in data or map SQL query.

7. <repository> element

Used to set the storage location for temporary resources. For more information, please refer to: Temporary Resource Lifecycle.

8. <relayService> element

The relay service configuration for iEdge is only used in iEdge products.

9.<license> element

Used to save the license information of the current iServe, including the version being used and the extended service license Refer to Select the license in iServer. Example is as follows:

  <license> 
    <enabledmodules> 
      <string>CHART</string>  
      <string>NETWORK</string>  
      <string>SPACE</string>  
      <string>SPATIAL</string>  
      <string>TRAFFIC_TRANSFER</string>  
      <string>PLOT</string>
      <string>SPATIAL_PROCESSING</string>
      <string>SERVICE_NODE_ADDITION</string>
      <string>ENTERPRISE</string> 
    </enabledmodules> 
  </license> 

<enabledmodules> contains the license names used, including:

 

10.<multiworkers> element

Used to configure information about multi-process services. Such as the number of processes, port range, etc., for example:

  <multiworkers>
    <enabled>true</enabled> 
    <workerCount>4</workerCount>
    <workerIP>127.0.0.1</workerIP> 
    <workerPortStart>8900</workerPortStart>
    <workerPortEnd>9000</workerPortEnd> 
    <workerBaseDir>../../workers</workerBaseDir>
    <xmx>1024m</xmx> 
    <communicationPort>8100</communicationPort>
    <requestDispatchMode>RANDOM</requestDispatchMode>  
    <timeout>20</timeout> 
  </multiworkers> 

The specific parameters are described below:

11.<processing> element

Used to configure the distributed analysis service, example is as follows:

<processing>
    <sparkHome>/home/supermap/spark-1.6.1-bin-hadoop2.6</sparkHome>
    <masterAddress>spark://sparkmaster:7077</masterAddress>
</processing>

<processing> contains the basic configuration of the Spark cluster:

Data storage configuration file

iserver-datastores.xml is used to configure the data storage. The root node is <application> element,and its subnode is <datastores>in which each datastore element is used to configure one data storage,Specific parameters are as follows:

Example is as follows:

  <?xml version="1.0" encoding="UTF-8"?>
   <application>
    <datastores>
     <datastore>
      <datastoreType>BIGDATAFILESHARE</datastoreType>
      <type>FOLDER</type>
      <name>samples</name>
      <url>../../samples/data/ProcessingData</url>
      <commonsCSVMetaData> 
       <xIndex>10</xIndex>  
       <yIndex>11</yIndex>  
       <separator>,</separator>
      </commonsCSVMetaData> 
     </datastore> 
    </datastores> 
   </application>