Opened 20 years ago

Closed 19 years ago

Last modified 19 years ago

#597 closed defect (fixed)

WFS server does not respond properly when no features are found

Reported by: bartvde@… Owned by: mapserverbugs
Priority: high Milestone: 4.4 release
Component: WFS Server Version: 4.1
Severity: normal Keywords:
Cc:

Description

When a user uses a BBOX in combination with a GetFeature request and no data is 
found by Mapserver, it gives the following invalid response (look especially at 
the box with inapplicable and null):

  <?xml version="1.0" encoding="ISO-8859-1" ?> 
 <wfs:FeatureCollection xmlns="http://www.ttt.org/myns" 
xmlns:myns="http://www.ttt.org/myns" xmlns:wfs="http://www.opengis.net/wfs" 
xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.opengis.net/wfs 
http://ogc.dmsolutions.ca/wfs/1.0.0/WFS-basic.xsd http://www.ttt.org/myns 
http://localhost/cgi-bin/mapserv_41.exe?
map=c:/ms4w/apps/geodan_sample/map/sample_wms_wfs_server.map&SERVICE=WFS&VERSION
=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=popplace">
 <gml:boundedBy>
 <gml:null>inapplicable</gml:null> 
  </gml:boundedBy>
</wfs:FeatureCollection>

Change History (5)

comment:1 by assefa, 19 years ago

Milestone: 4.4 release
This is the current response that I get. It seems to validate using xml-spy. 
Is it an xml problem that you mention or the use of <gml:null> ?


<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
   xmlns="http://www.ttt.org/myns"
   xmlns:myns="http://www.ttt.org/myns"
   xmlns:wfs="http://www.opengis.net/wfs"
   xmlns:gml="http://www.opengis.net/gml"
   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.opengis.net/wfs/1.0.0/WFS-basic.xsd 
                       http://www.ttt.org/myns http://localhost/cgi-
bin/mapserv.exe?
map=c:/msapps/wfs_filter/htdocs/ns_wfsserver.map&amp;SERVICE=WFS&amp;VERSION=1.
0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=popplace">
   <gml:boundedBy>
      <gml:null>inapplicable</gml:null>
   </gml:boundedBy>
</wfs:FeatureCollection>

comment:2 by bartvde@…, 19 years ago

Sorry, this has been partly my infamiliarity with this part of the GML spec. 

I think though that a value of "missing" will be better than "inapplicable"?
Because there are no features within the boundingbox requested.

  <simpleType name="NullType">
    <annotation>
      <documentation>
        If a bounding shape is not provided for a feature collection, 
        explain why. Allowable values are:
        innapplicable - the features do not have geometry
        unknown - the boundingBox cannot be computed
        unavailable - there may be a boundingBox but it is not divulged
        missing - there are no features
      </documentation>
    </annotation>
    <restriction base="string">
      <enumeration value="inapplicable"/>
      <enumeration value="unknown"/>
      <enumeration value="unavailable"/>
      <enumeration value="missing"/>
    </restriction>
  </simpleType>
</schema>

comment:3 by assefa, 19 years ago

Resolution: fixed
Status: newclosed
I agress with you Bart. I have changes it to missing. Closing this bug.

comment:4 by dmorissette, 19 years ago

I assume you meant to agree with and not to aggress Bart.  ;)

comment:5 by assefa, 19 years ago

oops, I did not have my cofee and cigarette before entering this. My
aggressivity is now under control :)
Note: See TracTickets for help on using tickets.