Configuring aggregation service provider

Feedback


The configuration of aggregation service provider is similar to the general service provider. It is configured in the <provider> node.

Assume that a WMS service provider is shown as follows:

<!-- WMS Service Provider -->
<provider name="wmsMapProvider1"
        class="com.supermap.services.providers.WMSMapProvider">
        <config
                class="com.supermap.services.providers.WMSMapProviderSetting">
                <url>http://192.168.115.136:7070/geoserver/wms</url>
        </config>
</provider>

Aggregate the WMS service provider with the UGC map service provider mentioned above. The configuration of the service providers is shown as follows:

<!-- Aggregation Service Provider -->
<provider name="aggMapProvider1" inner-providerNames="ugcMapProvider1,wmsMapProvider1"
        class="com.supermap.services.providers.AggregationMapProvider">
        <config
                class="com.supermap.services.providers.AggregationMapProviderSetting">
                <outputPath>../webapps/iserver/output</outputPath>
                <outputSite>http://localhost:8090/iserver/output/</outputSite>
                <name>agg</name>
                <targetName>aggMap</targetName>
        </config>
</provider>

In <provider> node, the inner-providerName attribute is the name for the service providers that will aggregate. You can choose multiple service providers, separated by ",". The class attribute is the implementation class of the aggregation service provider, namely AggregationMapProvider. The configuration class that the aggreation service provider corresponds to is AggregationMapProviderSetting. Its configuration item is shown as follows:

The Map component can use the aggregation service provider (For the configuration of service components, see Configuring Service Component). Here is an example about the Map component that uses the aggregation service provider:

<component name="agg"  class="com.supermap.services.components.impl.MapImpl"  providers="aggproviderset">
        <config class="com.supermap.services.components.MapConfig">
                <outputPath>../webapps/iserver/output</outputPath>
                <outputSite>http://localhost:8090/iserver/output/</outputSite>
        </config>
</component>

The value of providers attribute is aggproviderset, which refers to the name of the service provider set. The aggproviderset is configured as follows:

<providerSet name="aggproviderset">
        <provider-reference name="aggMapProvider1" enabled="true"></provider-reference> 
</providerSet>