Pitney Bowes MapXtreme User Manual
Page 351

Chapter 19: Web Map Service
Setting up a MapXtreme WMS Server
MapXtreme v7.1
358
Developer Guide
1. Open WMSSample.xml in a text editor and modify <mxp-wms:OnlineResource> line to point
to your WMS Server.
You can modify other elements as you see fit, including the server name, title, abstract, keyword
lists and vocabularies, contact information, fees, and access constraints.
<mxp-wms:Service>
<mxp-wms:Name>Sample WMS Server</mxp-wms:Name>
<mxp-wms:Title>Sample WMS Server</mxp-wms:Title>
<mxp-wms:Abstract>This is a sample WMS server</mxp-wms:Abstract>
<mxp-wms:KeywordList>
<mxp-wms:Keyword vocabulary="ISO 19115:2003">biota</mxp-
wms:Keyword>
<mxp-wms:Keyword vocabulary="ISO 19115:2010">biota</mxp-
wms:Keyword>
<mxp-wms:Keyword>rivers</mxp-wms:Keyword>
</mxp-wms:KeywordList>
<!-- The following is the URL of your WMS server, here assume it is
localhost -->
<mxp-wms:OnlineResource>http://localhost:port/WMS/GetMap.ashx</mxp-
wms:OnlineResource>
<mxp-wms:Fees>$10</mxp-wms:Fees>
<mxp-wms:AccessConstraints>none</mxp-wms:AccessConstraints>
</mxp-wms:Service>
2. Register your data layers by modifying the paths in the <DataSourceDefinitionSet>. Every
layer you wish to serve on your WMS needs an entry. The following is a portion of the
WMSSample.xml that identifies TAB files for a sample WMS Server:
<!-- The following data sources reference local TAB files, you need
to replace MYPATH with the real path to those tab files. -->
<TABFileDataSourceDefinition id="id1" readOnly="false"
xmlns="http://www.mapinfo.com/mxp">
<DataSourceName>STATES</DataSourceName>
<FileName>MYPATH\USA.TAB</FileName>
</TABFileDataSourceDefinition>
<TABFileDataSourceDefinition id="id2" readOnly="false"
xmlns="http://www.mapinfo.com/mxp">
<DataSourceName>US_HIWAY</DataSourceName>
<FileName>MYPATH\US_HIWAY.TAB</FileName>
</TABFileDataSourceDefinition>
<TABFileDataSourceDefinition id="id5" readOnly="false"
xmlns="http://www.mapinfo.com/mxp">
<DataSourceName>OCEAN</DataSourceName>
<FileName>MYPATH\OCEAN.TAB</FileName>
</TABFileDataSourceDefinition>
3. Describe the layers you want to host on your WMS server under the <mxp-wms:WMSLayer>
section. You will need one entry for every layer you plan to offer on your WMS server. Layers can