[mapserver-users] Mapserfer Wfs and Mapinfo

Iacovlev Pavel iacovlev.pavel at gmail.com
Thu Jul 3 05:30:33 EDT 2008


I configured phpmapscript to work as a Wfs server, it works ok in udig, ugis, 
but it doesn't in mapinfo. My main goal to make it work in mapinfo.

The error from MapInfo triggered then I select a layer : "XML Document Parsing 
Error: Only one top level document is allowed in an XML Document

In response to a DescribeFeatureType request, the WFS server returned an 
invalid feature type."

So I wrote a little php script that logs the request/post/get that mapinfo 
does (see Log), and it actualy does not request anythink then it should 
request DescribeFeatureType. I thought it's a mapinfo + mapserver problem, 
but this WFS server (built on mapserver) 
http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap works perfect in mapinfo. 
Any help will be really appreciated.

Log :

REQUEST :
Array
(
    [VERSION] => 1.0.0
    [SERVICE] => WFS
    [REQUEST] => GetCapabilities
)

POST :
Array
(
)

GET :
Array
(
    [VERSION] => 1.0.0
    [SERVICE] => WFS
    [REQUEST] => GetCapabilities
)

DATA :
<?xml version='1.0' encoding="ISO-8859-1" ?>
<WFS_Capabilities
   version="1.0.0"
   updateSequence="0"
   xmlns="http://www.opengis.net/wfs"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/wfs 
http://schemas.opengeospatial.net/wfs/1.0.0/WFS-capabilities.xsd">

<!-- MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->

<Service>
  <Name>MapServer WFS</Name>
  <Title>Wfs server</Title>
  <OnlineResource>http://192.168.1.2:8000/wfs?</OnlineResource>
</Service>

<Capability>
  <Request>
    <GetCapabilities>
      <DCPType>
        <HTTP>
          <Get onlineResource="http://192.168.1.2:8000/wfs?" />
        </HTTP>
      </DCPType>
      <DCPType>
        <HTTP>
          <Post onlineResource="http://192.168.1.2:8000/wfs?" />
        </HTTP>
      </DCPType>
    </GetCapabilities>
    <DescribeFeatureType>
      <SchemaDescriptionLanguage>
        <XMLSCHEMA/>
      </SchemaDescriptionLanguage>
      <DCPType>
        <HTTP>
          <Get onlineResource="http://192.168.1.2:8000/wfs?" />
        </HTTP>
      </DCPType>
      <DCPType>
        <HTTP>
          <Post onlineResource="http://192.168.1.2:8000/wfs?" />
        </HTTP>
      </DCPType>
    </DescribeFeatureType>
    <GetFeature>
      <ResultFormat>
        <GML2/>
      </ResultFormat>
      <DCPType>
        <HTTP>
          <Get onlineResource="http://192.168.1.2:8000/wfs?" />
        </HTTP>
      </DCPType>
      <DCPType>
        <HTTP>
          <Post onlineResource="http://192.168.1.2:8000/wfs?" />
        </HTTP>
      </DCPType>
    </GetFeature>
  </Request>
</Capability>

<FeatureTypeList>
  <Operations>
    <Query/>
  </Operations>
    <FeatureType>
        <Name>retea500</Name>
        <Title>Retea 500</Title>
        <SRS>EPSG:28405</SRS>
        <LatLongBoundingBox minx="-9.2958e+13" miny="-1.28383e+30" 
maxx="2.27243e+12" maxy="1.28383e+30" />
    </FeatureType>
</FeatureTypeList>

<ogc:Filter_Capabilities>
  <ogc:Spatial_Capabilities>
    <ogc:Spatial_Operators>
      <ogc:Equals/>
      <ogc:Disjoint/>
      <ogc:Touches/>
      <ogc:Within/>
      <ogc:Overlaps/>
      <ogc:Crosses/>
      <ogc:Intersect/>
      <ogc:Contains/>
      <ogc:DWithin/>
      <ogc:BBOX/>
    </ogc:Spatial_Operators>
  </ogc:Spatial_Capabilities>
  <ogc:Scalar_Capabilities>
    <ogc:Logical_Operators />
    <ogc:Comparison_Operators>
      <ogc:Simple_Comparisons />
      <ogc:Like />
      <ogc:Between />
    </ogc:Comparison_Operators>
  </ogc:Scalar_Capabilities>
</ogc:Filter_Capabilities>

</WFS_Capabilities>

==========

REQUEST :
Array
(
)

POST :
Array
(
)

GET :
Array
(
)

DATA :

==========

DescribeFeatureType:
<?xml version='1.0' encoding="ISO-8859-1" ?>
<schema
   targetNamespace="http://mapserver.gis.umn.edu/mapserver" 
   xmlns:ms="http://mapserver.gis.umn.edu/mapserver" 
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns="http://www.w3.org/2001/XMLSchema"
   xmlns:gml="http://www.opengis.net/gml"
   elementFormDefault="qualified" version="0.1" >

  <import namespace="http://www.opengis.net/gml"
          
schemaLocation="http://schemas.opengeospatial.net/gml/2.1.2/feature.xsd" />

  <element name="retea500" 
           type="ms:retea500Type" 
           substitutionGroup="gml:_Feature" />

  <complexType name="retea500Type">
    <complexContent>
      <extension base="gml:AbstractFeatureType">
        <sequence>

          <element name="msGeometry" type="gml:GeometryPropertyType" 
minOccurs="0" maxOccurs="1"/>
          <element name="gid" type="string"/>
          <element name="nomencl" type="string"/>
          <element name="tip_500_id" type="string"/>
          <element name="mat_500_id" type="string"/>
          <element name="str_500_id" type="string"/>
        </sequence>
      </extension>
    </complexContent>

  </complexType>

</schema>


More information about the mapserver-users mailing list