Configuration file description

Feedback


Module configuration file

The module configuration file is the file without the suffix, used for configuring the encoder, decoder and the resource configuration file. The file is located in Jar:///META-INF/extensions/services/rest.

Content:

encoders=<the absolute path of encoder>

decoders=<the absolute path of decoder>

verifiers=<the absolute path of security implementation class>

resourceFiles=<the absolute path of resource configuration file>

Where

When extending the existing resource module, it is required that the configuration file name should be consistent with the name of the pre-extension resource module.

The existing implemented resource modules by using the JAX-RS of the SuperMap iServer is the spatial analysis module.

Table The correspondence of the resource module and the configuration file

Module Configuration file name

Map

mapRest

Data

dataRest

Spatial analysis

spatialAnalystRest

Transportation analysis

networkanalystRest

3D

realspaceRest

Resource configuration file

Resource configuration file is a XML file, which is used to configure the REST resource information. It can configure the resource ID, resource implemention class and so on. It determines REST resource with Module configuration file.

There are two mechanisms Restlet and JAX-RS in SuperMap iServer. So there are differences in the structure of resource configuration file.

Resources based on Restlet mechanism, as shown below:

<?xml version="1.0" encoding="UTF-8"?>

<resources>

        <resource>

            <configID>rectangleArea</configID>

            <urlTemplate>/maps/{mapName}/rectangleArea</urlTemplate>

            <resourceType>ArithmeticResource</resourceType>

            <implementClass>com.supermap.sample.extendREST.RectangleAreaResource</implementClass>

            <extensionEncoderBeanNames></extensionEncoderBeanNames>

            <extensionDecoderBeanNames></extensionDecoderBeanNames>

        </resource>

</resources>

Where:

There can be more<resources/>in the<resource/>label, which corresponds to multiple resources.

The resources implemented based on JAX-RS, as shown below:

<?xml version="1.0" encoding="UTF-8"?>

<resources>

  <resource>

    <configID>mybuffer</configID>

    <implementClass>com.supermap.sample.extend.MyBufferResultsResource</implementClass>

  </resource>

</resources>

Where:

There can be more<resources/>in the<resource/>label, which corresponds to multiple resources.

 

When extending the existing resource module, it is required that the configuration file name should be consistent with the name of the pre-extension resource module.

The existing implemented resource modules by using the JAX-RS of the SuperMap iServer is the spatial analysis module.

Table The correspondence of the resource module and the configuration file

Module Configuration file path(iserver-all-*.jar)

Map

resource/rest/mappingResources.xml

Data

resource/rest/dataResources.xml

Spatial analysis

resource/rest/spatialanalystResources.xml

Transportation analysis

resource/rest/networkanalystResources.xml

3D

resource/rest/realspaceResources.xml