The service interface is configured to support network
services published according to different service specifications at the
service interface layer, such as REST services, WMS services, WFS services,
WMTS services, WCS services, WPS services, OGC API services, and user-defined
types of services. You can modify the interfaces used in the service by
modifying the service interface configuration file iserver-services interfaces.xml
(see iServer configuration
file instruction) in the service configuration file. The configuration
of service interfaces is carried out in the
Interface Config File Structures
The name property of < interface > identifies the service interface. It is a required parameter through which you can access a specific type of service. See the URI setting of the service.
The structure of the < interface > node in the config file is as follows:
<application> ... <interfaces> ... <interface> ... <interface/> </interfaces> </application>
Types of different service interfaces are distinguished by definition class, and configuration information is defined by configuration class. See Table 1 Implementation and Configuration of Service Tnterfaces.
Table 1 Implementation and Configuration of Service Tnterfaces
| Basic type | Version | Service interfaces implementation class | Service interfaces configuration class |
| REST REST/JSR ArcGIS REST1 Baidu REST1 Google REST1 OSMRestServlet1 TMSRestServlet1 | -- | com.supermap.services.rest.RestServlet com.supermap.services.rest.JaxrsServletForJersey com.supermap.services.rest.AGSRestServlet com.supermap.services.rest.BaiduRestServlet com.supermap.services.rest.GoogleRestServlet com.supermap.services.rest.OSMRestServlet com.supermap.services.rest.TMSRestServlet | com.supermap.services.rest.RestConfig com.supermap.services.rest.JaxrsConfigForJersey com.supermap.services.rest.AGSRestConfig |
| WMS | 1.1.1 1.3.0 | com.supermap.services.wms.WMSServlet | com.supermap.services.wms.WMSConfig |
| WFS | 1.0.0 2.0.0 | com.supermap.services.wfs.WFSServlet | com.supermap.services.wfs.WFSConfig |
| WCS | 1.1.1 1.1.2 | com.supermap.services.wcs.WCSServlet | com.supermap.services.wcs.WCSConfig |
| WMTS | 1.0.0 | com.supermap.services.wmts.WMTSServlet | com.supermap.services.wmts.WMTSConfig |
| WPS | 1.0.0 | com.supermap.services.wps.WPSServlet | com.supermap.services.wps.WPSConfig |
| OGC API | 1.0 | com.supermap.services.ogcapi.OGCAPIServlet | com.supermap.services.ogcapi.OGCAPIConfig |
Note 1: iServer Advanced and iEdge provides this interface.
Configure the REST Interface
SuperMap iServer provides two REST interfaces based on Restlet and Jersey, which correspond to two interface implementation classes respectively RestServlet and JaxrsServletForJersey.
Configure a Restlet-based REST interface as follows:
<interface class="com.supermap.services.rest.RestServlet" name="rest"> <config class="com.supermap.services.rest.RestConfig"> <accessControlAllowOrigin></accessControlAllowOrigin> </config> </interface>
The class attribute of the < interface > node identifies the interface type, which corresponds to the implementation class RestServlet, the < config > node is the configuration item corresponding to the REST service interfaces, that is, the interface configuration class RestConfig . Description of main parameters:
- < accessControlAllowOrigin >: configures which services can be accessed by REST services across domains, and supports filling in a domain name. When the value is "*", it means that all services can access the current service across domains REST service.
Configure a Jersey-based REST interface as follows:
<interface class="com.supermap.services.rest.JaxrsServletForJersey" name="restjsr"> <config class="com.supermap.services.rest.JaxrsConfigForJersey"> <accessControlAllowOrigin></accessControlAllowOrigin> </config> </interface>
Where, the class attribute of the < interface > node identifies the interface type, corresponding to the implementation class JaxrsServletForJersey, and the < config > node is the configuration item corresponding to the REST service interfaces, namely, the interface configuration class JaxrsConfigForJersey .
Configure an ArcGIS REST interface as follows:
<interface class="com.supermap.services.rest.AGSRestServlet" name="arcgisrest"> <config class="com.supermap.services.rest.AGSRestConfig"> <accessControlAllowOrigin></accessControlAllowOrigin"> <notUseTransparentTile>false</notUseTransparentTile"> </config> </interface>
The class attribute of the < interface > node identifies the interface type, which corresponds to the implementation class AGSRestServlet, and the < config > node is the configuration item corresponding to the ArcGIS REST service interfaces is the interface configuration class AGSRestConfig. The main configuration parameters are as follows:
NotUseTrans parentTile: Sets the transparent background of the image returned by the tile resource. Default: false, That is, transparent.
Configure a Baidu REST interface as follows:
<interface class="com.supermap.services.rest.BaiduRestServlet" name="baidurest"> <config class="com.supermap.services.rest.RestConfig"> <accessControlAllowOrigin></accessControlAllowOrigin> </config> </interface>
Where, the class attribute of the < interface > node identifies the interface type, corresponding to the implementation class BaiduRestServlet, and the < config > node is the configuration item corresponding to the Baidu REST service interfaces is the interface configuration class RestConfig .
Configure a Google REST interface as follows:
<interface class="com.supermap.services.rest.GoogleRestServlet" name="googlerest"> <config class="com.supermap.services.rest.RestConfig"> <accessControlAllowOrigin></accessControlAllowOrigin> </config> </interface>
The class attribute of the < interface > node identifies the interface type, which corresponds to the implementation class GoogleRestServlet, and the < config > node is the configuration item corresponding to the Google REST service interfaces is the interface configuration class RestConfig .
Configure an OSM REST interface as follows:
<interface class="com.supermap.services.rest.OSMRestServlet" name="osmrest"> <config class="com.supermap.services.rest.RestConfig"> <accessControlAllowOrigin></accessControlAllowOrigin> </config> </interface>
The class attribute of the < interface > node identifies the interface type, which corresponds to the implementation class OSMRestServlet, and the < config > node is the configuration item corresponding to the OSM REST service interfaces is the interface configuration class RestConfig .
Configure a TMS REST interface as follows:
<interface class="com.supermap.services.rest.TMSRestServlet" name="tmsrest"> <config class="com.supermap.services.rest.RestConfig"> <accessControlAllowOrigin></accessControlAllowOrigin> </config> </interface>
The class attribute of the < interface > node identifies the interface type, which corresponds to the implementation class TMSRestServlet, and the < config > node is the configuration item corresponding to the TMS REST service interfaces is the interface configuration class RestConfig .
Note: Use ArcGIS, Baidu, Google, OSM, TMS in iServer REST service interfaces, iServer Advanced is required and iEdge is ready to use.
Configure WMS Service Interface
SuperMap iServer provides services that support WMS 1.1.1 and 1.3.0 standards. Configure a WMS 1.1.1 Interfaces are as follows:
<interface class="com.supermap.services.wms.WMSServlet" name="wms111">
<config class="com.supermap.services.wms.WMSConfig">
<serviceDescription>
<keywords/>
<contactInformation>
<person>person</person>
<organization>organization</organization>
<position>position</position>
<addressType>addressType</addressType>
<address>address</address>
<city>city</city>
<stateOrProvince>State Or Province</stateOrProvince>
<postCode>postCode</postCode>
<country>country</country>
<voiceTelephone>Telephone</voiceTelephone>
<facsimileTelephone>fax</facsimileTelephone>
<electronicMailAddress>E-mail</electronicMailAddress>
</contactInformation>
</serviceDescription>
<version>1.1.1</version>
<cacheEnabled>false</cacheEnabled>
<sld>
<pointStyles/>
<lineStyles/>
<polygonStyles>
<string>./WEB-INF/config/region.sld</string>
</polygonStyles>
<textStyles/>
</sld>
<useStandardBGColor>false</useStandardBGColor>
</config>
</interface>
The class attribute of the < interface > node identifies the interface type, corresponding to the implementation class WMSServlet, and the < config > node is the configuration item corresponding to the WMS service interfaces is the interface configuration class WMSConfig . The main configuration parameters are as follows:
- <contactInformation> :Contact Information
- <person>:person
- <organization>:organization
- <position>:position
- <addressType>:address type
- <address>:address
- <city>:city
- <stateOrProvince>:province or region
- <postCode>:postcode
- <country>:country
- <voiceTelephone>:contact number
- <facsimileTelephone>:fax
- <electronicMailAddress>:E-mail
- <version>:The version number of WMS service currently supports versions 1.1.1 and 1.3.0.
- <crs>:The specified coordinate system of the WMS interface takes effect when <version> is 1.3.0. Optional parameters.
- <srs>:The specified coordinate system of the WMS interface takes effect when <version> is 1.1.0. Optional parameters.
- <cacheEnabled>:Whether to use cache. Optional parameters.
- <sld>:The SLD information included in the WMS service currently supports point, line, face, and text layers in WMS 1.1.1.
- <serviceDescription>:WMS service description information, optional parameters.
- <reverseLayerOrder>:Reverse layer order switch. The default is true, which means that when displaying layers in the capability document, they are arranged in ascending order by layer ID number. When set to false, it will be arranged in descending order.
Configure WFS Service Interface
SuperMap iServer provides services that support the WFS 1.0.0, 2.0.0 standard.
Configure a WFS 1.0.0 interface as follows:
<interface name="wfs100" class="com.supermap.services.wfs.WFSServlet"> <config class="com.supermap.services.wfs.WFSConfig"> <version>1.0.0</version> <serviceDescription> <name>SuperMap Web Feature Service</name> <title>Example WFS Service</title> <serviceAbstract>SuperMap iServer's WFS service based on demonstration data publishing</serviceAbstract> <keywords> <string>iServer</string> <string>Sample Data</string> </keywords> <fees>none</fees> <accessConstraints>none</accessConstraints> </serviceDescription> </config> </interface>
Configure a WFS 2.0.0 interface as follows:
<interface name="wfs200" class="com.supermap.services.wfs.WFSServlet"> <config class="com.supermap.services.wfs.WFSConfig"> <version>2.0.0</version> <identification> <title>Example WFS Service</title> <description>SuperMap iServer's WFS service based on demonstration data publishing</description> <keywords> <string>iServer</string> <string>Sample Data</string> </keywords> <fees>none</fees> <accessConstraints>none</accessConstraints> <serviceType>OGC WFS</serviceType> <serviceTypeVersion>2.0.0</serviceTypeVersion> </identification> <provider> <providerName>SuperMap Software Co., Ltd.</providerName> <providerSite>https://www.supermap.com.cn</providerSite> <serviceContact> <individualName>individual name</individualName> <positionName>position name</positionName> <phoneNumber>+86-10-59896655</phoneNumber> <faxNumber>+86-10-59896666</faxNumber> <deliveryPoint>SuperMap Software Co., Ltd.6/F, Building 107, No. A10, Jiuxianqiao North Road, Chaoyang District, Beijing</deliveryPoint> <addressCity>Beijing</addressCity> <addressAdministrativeArea>Beijing</addressAdministrativeArea> <addressPostalCode>100015</addressPostalCode> <addressCountry>China</addressCountry> <addressElectronicMailAddress>support@supermap.com</addressElectronicMailAddress> </serviceContact> </provider> </config> </interface>
Among them, the class attribute of the <interface> node identifies the interface type, corresponding to the implementation class WFSServlet, the <config> node is the configuration item corresponding to the WFS service interface, which is the interface configuration class WFSConfig. Except for general contact information, the main configuration parameters are as follows:
- <maxFeatures>:Used to set the maximum number of query results returned by the iServer by default. The dafault value is 2000. If set to 0 or -1, all results will be returned by default.
Configure WMTS Service Interface
SuperMap iServer provides services that support the WMTS 1.0.0 standard, as well as a "wmts-china" interface instance that is compatible with the map grading standards in the "Geographic Information Public Service Platform Electronic Map Data Specification". It can be used to interface with domestic map services such as Tianmu. It also provides a "wmts-arggis" interface instance that is compatible with WMTS services released by ArcGIS products, providing tile map services that are compatible with WMTS services released by ArcGIS products after blocking personalized differences.
Configure a WMTS 1.0.0 interface as follows:
<interface class="com.supermap.services.wmts.WMTSServlet" name="wmts100"> <config class="com.supermap.services.wmts.WMTSConfig"> <customEntireBounds>37401549.97829401,4106688.3416817067,37512864.43126909,4189138.542744882</customEntireBounds> <epsgsBoundingBoxReversed>4490,4525</epsgsBoundingBoxReversed> <disableTileMatrixSetLimits>GoogleMapsCompatible,GlobalCRS84Scale</disableTileMatrixSetLimits> <identification> <title>Example WMTS Service</title> <description>SuperMap iServer 6R WMTS Service Based on Demonstration Data Publishing</description> <keywords> <string>iServer 6R</string> <string>Sample Data</string> </keywords> <fees>none</fees> <accessConstraints>none</accessConstraints> <serviceType>OGC WMTS</serviceType> <serviceTypeVersion>1.0.0</serviceTypeVersion> </identification> <provider> <providerName>SuperMap Software Co., Ltd.</providerName> <providerSite>https://www.supermap.com.cn</providerSite> <serviceContact> <individualName>individual name</individualName> <positionName>position name</positionName> <phoneNumber>+86-10-59896655</phoneNumber> <faxNumber>+86-10-59896666</faxNumber> <deliveryPoint>SuperMap Software Co., Ltd.6/F, Building 107, No. A10, Jiuxianqiao North Road, Chaoyang District, Beijing</deliveryPoint> <addressCity>Beijing</addressCity> <addressAdministrativeArea>Beijing</addressAdministrativeArea> <addressPostalCode>100015</addressPostalCode> <addressCountry>China</addressCountry> <addressElectronicMailAddress>support@supermap.com</addressElectronicMailAddress> </serviceContact> </provider> <tileMatrixSets> <com.supermap.services.wmts.TileMatrixSet> <wellKnownScaleSet>Custom</wellKnownScaleSet> <scales/> <dpi>90.7142857142857</dpi> <tileWidth>256</tileWidth> <tileHeight>256</tileHeight> </com.supermap.services.wmts.TileMatrixSet> <com.supermap.services.wmts.TileMatrixSet> <wellKnownScaleSet>GlobalCRS84Scale</wellKnownScaleSet> </com.supermap.services.wmts.TileMatrixSet> <com.supermap.services.wmts.TileMatrixSet> <wellKnownScaleSet>GoogleMapsCompatible</wellKnownScaleSet> </com.supermap.services.wmts.TileMatrixSet> </tileMatrixSets> </config> </interface>
Where, the class attribute of the < interface > node identifies the interface type, corresponding to the implementation class WMTSServlet, and the < config > node is the configuration item corresponding to the WMTS service interfaces, namely, the interface configuration class WMTSConfig . The main configuration parameters are as follows:
- < customEntireBounds >: Specify the full range of maps in the WMTS service. Fill in the latitude and longitude or X/Y coordinates of the bottom left and top right corners of the map in the WMTS service, separated by commas (",") in English. When overlaying WMTS services on certain third-party clients, such as OpenLayers 2.10, it is required that the scope of WMTS services be consistent with the scope of the base map. Optional parameters.
- < epsgsBoundingBoxReversed >: Specify that the BoudingBox needs to be reversed EPSG code of the coordinate system in the order of X and Y coordinates of LowerCorner and UpperCorner. Each coordinate system is separated by a comma. Filling in "all" indicates that the coordinate order of all coordinate systems is reversed.
- < disableTileMatrixSet Limits >: Specify a scale set without TileMatrixSetLimits, separated by commas in English. Fill in "all" to indicate that TileMatrixSetLimits are not set for all scale sets.
- < identification >: Service description information. Optional parameters.
- < maps >: Map names allowed for publication, separated by commas between multiple map names. Optional parameters.
- < provider >: Information about the service provider. Optional parameters.
- < tileMatrixSets >: The collection of all scale sets supported by WMTS service. If the scale set is empty or one of its scales is empty, level 0 represents the entire map as a 256x256 pixel block, level 1 represents the entire map as 2x2 256x256 pixel blocks, and so on, multiplying by 2 step by step. Optional parameters.
- < verifyMode >: Used to set the WMTS service validation mode, default to DEFAULT, indicating iServer compatibility with specification mode, which is compatible with some parameters such as service, style, etc. If set to STANDARD, it means it is an OGC specification mode, which stipulates that services must strictly comply with OGC specifications. Optional parameters.
- < hideFeatureInfo >: GetCapabilities returns whether to display in the result FeatureInfo resource. When set to true, the FeatureInfo resource is not displayed. The default value of false means that the FeatureInfo resource is displayed.
- <disableExpandScales>: Whether to turn off displaying map with expanded tile scale. The default is false, that is, it is not turned off. When it is turned off, the WMTS service getTile operation no longer supports displaying map with scale ranges smaller than 3/4 of the minimum scale of the tiles and larger than 3/2 of the maximum scale of the tiles.
The "wmts-china" interface configuration information is as follows:
<interface class="com.supermap.services.wmts.WMTSServlet" name="wmts-china"> <config class="com.supermap.services.wmts.WMTSConfig"> <identification/> <provider/> <tileMatrixSets> <com.supermap.services.wmts.TileMatrixSet> <wellKnownScaleSet>ChinaPublicServices</wellKnownScaleSet> </com.supermap.services.wmts.TileMatrixSet> </tileMatrixSets> </config> </interface>
Among them, the <wellKnownScaleSet> parameter specifies the use of the "ChinaPublicServices" scale set that complies with the map grading standards in the "Geographic Information Public Service Platform Electronic Map Data Specification".
The configuration information of the "wmts arggis" interface is consistent with that of "wmts-100", except that default values are provided for the epsgsBoundingBoxReversed and disableTileMatrixSetLimits parameters, which are 284102001024354525223904491 and GoogleMapsBompatible and GlobalCRS84Scale, respectively. Users can still modify it as needed.
Configure WCS Service Interface
SuperMap iServer provides services that support the WCS 1.1.1 and 1.1.2 standards. Configure a WCS 1.1.1 interface as follows:
<interface class="com.supermap.services.wcs.WCSServlet" name="wcs111"> <config class="com.supermap.services.wcs.WCSConfig"> <version>1.1.1</version> <identification> <title>Example WCS Service</title> <description>SuperMap iServer 6R WCS Service Based on Demonstration Data Publishing</description> <keywords> <string>iServer 6R</string> <string>Sample Data</string> </keywords> <fees>none</fees> <accessConstraints>none</accessConstraints> <serviceType>OGC WCS</serviceType> <serviceTypeVersion>1.1.1</serviceTypeVersion> </identification> <provider> <providerName>SuperMap Software Co., Ltd.</providerName> <providerSite>https://www.supermap.com.cn</providerSite> <serviceContact> <individualName>individual name</individualName> <positionName>position name</positionName> <phoneNumber>+86-10-59896655</phoneNumber> <faxNumber>+86-10-59896666</faxNumber> <deliveryPoint>SuperMap Software Co., Ltd.6/F, Building 107, No. A10, Jiuxianqiao North Road, Chaoyang District, Beijing</deliveryPoint> <addressCity>Beijing</addressCity> <addressAdministrativeArea>Beijing</addressAdministrativeArea> <addressPostalCode>100015</addressPostalCode> <addressCountry>China</addressCountry> <addressElectronicMailAddress>support@supermap.com</addressElectronicMailAddress> </serviceContact> </provider> </config> </interface>
Among them, the class attribute of the < interface > node identifies the interface type, corresponding to the implementation class WCSServlet, the < config > node is the configuration item corresponding to the WCS service interface, which is the interface configuration class WCSConfig. The main configuration parameters are as follows:
- < version >: The version number of WCS service, currently supported by SuperMap iServer for WCS service versions 1.1.1 and 1.1.2.
- < identification >: Service description information. Optional parameters.
- < provider >: Information about the service provider. Optional parameters.
Configure OGC API service interfaces.
Supported by SuperMap iServer OGC API-Features, OGC API-Tiles standard services. Configure an OGC API interface as follows:
<interface name="ogcapi" class="com.supermap.services.ogcapi.OGCAPIServlet"> <config class="com.supermap.services.ogcapi.OGCAPIConfig"> <apiVerison> <features>1.0</features> </apiVersion> </config> </interface>
Custom interface
You can customize the interface type in the system config file (iserver-system.xml). An example of adding a custom interface type is as follows:
<interface-type configClass="com.supermap.services.sm.SMConfig"> com.supermap.services.sm.SMServlet </interface-type>
Among them, com.supermap.services.sm.MServlet is the implementation class of a custom interface type, and com.supermap.services.sm.SMConfig is the configuration class of a custom interface type.
The structure of the < interface-type > node in the config file is as follows:
<server> <management> … <interface-types> … <interface-type > … </interface-type> </interface-types> </management> </server>