Mapserver's WFS-client problems - Can't get it to work

Alexandre Florio aflorio at GISPLAN.COM.BR
Wed Aug 4 13:39:34 EDT 2004


    I'm having problems while trying to access a WFS-server (Geoserver 1.2.0-rc2) through Mapserver's WFS-client support.  Mapserver's version is 4.2.1.

    This is how my WFS-client layer is set up:

LAYER
  NAME "acervo_espacial"
  TYPE POLYGON
  CONNECTIONTYPE WFS
  CONNECTION "http://localhost:8080/geoserver/wfs"
  STATUS ON
  METADATA
    "wfs_version" "1.0.0"
    "wfs_service" "WFS"
    "wfs_typename" "gisplan:acervo_espacial"
  END
  PROJECTION
    "init=epsg:4291"
  END
END

    This is the error message from Mapserver:

msDrawMap(): Image handling error. Failed to draw layer named 'acervo_espacial'.
msWFSLayerWhichShapes(): WFS connection error. WFS request produced unexpected output (junk?) for layer acervo_espacial.

    I have already tried setting up the layer passing the WFS parameters (version and typename) directly in the CONNECTION parameter, via GET, without success.
    The "junk" that Mapserver talks about is a .gml file containing a "ServiceExceptionReport" node:

<?xml version="1.0" ?>
<ServiceExceptionReport
   version="1.2.0"
   xmlns="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
   <ServiceException locator="org.vfny.geoserver.requests.readers.XmlRequestReader">
      XML getFeature request SAX parsing error: org.xml.sax.SAXException: Attempted to construct illegal filter: Got to the end state of an incomplete filter, current state is rightValue
(java stack trace)
   </ServiceException>
</ServiceExceptionReport>

    Geoserver returns correct GML when I send a 'GetFeature' request using a browser:
    (http://localhost:8080/geoserver/wfs?request=GetFeature&typename=gisplan:acervo_espacial returns valid GML)

    This is the request that Mapserver is sending to Geoserver (I got it using netcat, listening in a different port set up in the CONNECTION parameter):

POST /geoserver/wfs HTTP/1.1
Host: localhost:5555
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Type: text/xml
Content-Length: 305

<?xml version="1.0" ?>
<GetFeature
service="WFS"
version="1.0.0"
outputFormat="GML2">
<Query typeName="gisplan:acervo_espacial">
<Filter>
<BBOX>
<PropertyName>Geometry</PropertyName>
<Box>
<coordinates>-77.038333,-37.435044 -31.038333,8.511622</coordinates>
</Box>
</BBOX>
</Filter></Query>
</GetFeature>

    Which seems good to me, but Geoserver complains that the Filter is invalid (see the exception description above).
    Does anybody know what can be wrong here?


Alexandre



More information about the mapserver-users mailing list