Pitney Bowes MapXtreme User Manual

Page 395

Advertising
background image

Chapter 22: Web Feature Service

Configuring a WFS Server

MapXtreme v7.1

402

Developer Guide

2. Register the tables that the WFS serves by creating a Table element for each table. The value for

the <mxp-wfs:DataSourceDefinition> id must match the value for <mxp-wfs:Name>. You can
include the tables in any order.

3. In the <DataSourceDefinitionSet>, modify the MYPATH variable to reflect the actual path to your

data.
The following is a portion of the WFSSample.xml that identifies two tables of features.

<mxp-wfs:Table>

<mxp-wfs:Name>USA</mxp-wfs:Name>
<mxp-wfs:Title>Title for usa</mxp-wfs:Title>
<mxp-wfs:Abstract>Abstract for USA</mxp-wfs:Abstract>
<mxp-wfs:Keywords>Keywords for USA</mxp-wfs:Keywords>
<mxp:DataSourceDefinitionSet>

<mxp:TABFileDataSourceDefinition id="USA">

<mxp:DataSourceName>USA</mxp:DataSourceName>
<mxp:FileName>MYPATH\USA.TAB</mxp:FileName>

</mxp:TABFileDataSourceDefinition >

</mxp:DataSourceDefinitionSet>

</mxp-wfs:Table>
<mxp-wfs:Table>

<mxp-wfs:Name>US_HIWAY</mxp-wfs:Name>
<mxp-wfs:Title>Title for US_HIWAY</mxp-wfs:Title>
<mxp-wfs:Abstract>Abstract for US_HIWAY</mxp-wfs:Abstract>
<mxp-wfs:Keywords>Keywords for US_HIWAY</mxp-wfs:Keywords>
<mxp:DataSourceDefinitionSet>

<mxp:TABFileDataSourceDefinition id="US_HIWAY">

<mxp:DataSourceName>US_HIWAY</mxp:DataSourceName>
<mxp:FileName>MYPATH\US_HIWAY.TAB</mxp:FileName>

</mxp:TABFileDataSourceDefinition >

</mxp:DataSourceDefinitionSet>

</mxp-wfs:Table>

4. If your WFS will be hosting data that is stored on a RDBMS, specify <ConnectionSet> and

<ConnectionMember> elements, following the example below:
<mxp:ConnectionSet>

<mxp:DBConnection dbType="sqlserver">

<mxp:ConnectionName>sqlserver2k</mxp:ConnectionName>
<mxp:ODBCConnectionString>DRIVER={SQL
Server};DATABASE=YOURDB;Server=YOURSERVER;UID=YOURUSER;PWD=YOURPASSWORD;Q
uotedID=No;Trusted_Connection=No;Network=DBMSSOCN;Address=YOURSERVER,YOUR
SERVERPORT</mxp:ODBCConnectionString>
</mxp:DBConnection

</mxp:ConnectionSet>

...

<mxp-wfs:Table>

<mxp-wfs:Name>MySQLServerTable</mxp-wfs:Name>
<mxp-wfs:Title>Title for MySQLServerTable</mxp-wfs:Title>
<mxp-wfs:Abstract>Abstract for MySQLServerTable</mxp-

wfs:Abstract>

<mxp-wfs:Keywords>Keywords for MySQLServerTable</mxp-

wfs:Keywords>

Advertising