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 thenode, and different types of service interfaces have different configuration items. For detailed parameter introductions on configuring different types of interfaces, please refer to Configuring Service Interfaces through Service Manager.
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.
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:
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.
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:
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:
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:
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.
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:
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>
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>