[mapserver-users] [TinyOWS] Broken config using a MAPFILE?
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Wed Sep 19 07:47:34 PDT 2012
Hi,
I wonder why OpenLayers is sending request for wfs:Query typeName="feature:areas" while I suppose that the typeName is actually mtl:areas. However, it looks like TinyOWS does not care about featuretype namespace at all. This request works as it should
http://188.64.1.61/cgi-bin/tinyows?service=WFS&version=1.1.0&request=GetFeature&typeName=lv:mml_paikannimet20&maxFeatures=20
However, query finds also a non-existing featuretype foo:mml_paikannimet20
http://188.64.1.61/cgi-bin/tinyows?service=WFS&version=1.1.0&request=GetFeature&typeName=foo:mml_paikannimet20&maxFeatures=20
Somehow I feel this is a bug.
-Jukka Rahkonen-
Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Richard Turner
Lähetetty: 19. syyskuuta 2012 10:43
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] [TinyOWS] Broken config using a MAPFILE?
Hi folks,
I hope one of you can help me. A few months ago I was working on a project using tinyows to display UK postcode areas on an OpenLayers map. That was working fine, but it was a prototype and hasn't been touched for quite a while.
I've since set-up a new server and installed the trunk version of tinyows on it and found that instead of working fine tinyows returns the following error:
<?xml version='1.0' encoding='UTF-8'?>
<ows:ExceptionReport
xmlns='http://www.opengis.net/ows'
xmlns:ows='http://www.opengis.net/ows'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'
version='1.1.0' language='en'>
<ows:Exception exceptionCode='InvalidParameterValue' locator='FILTER'>
<ows:ExceptionText>Filter parameter doesn't validate WFS Schema</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
The request being sent by OpenLayers is this:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd<http://www.opengis.net/wfs%20http:/schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd>" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query typeName="feature:areas" xmlns:feature="http://gis.mediatel.co.uk"><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:BBOX><ogc:PropertyName>wkb_geometry</ogc:PropertyName><gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:3857"><gml:coordinates decimal="." cs="," ts=" ">-417651.92249206,6609322.2049643 417651.92249206,6811115.9596091</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter></wfs:Query></wfs:GetFeature>
I'm using a MAPFILE to configure tinyows because I was originally using mapserver instead (but I envisage the need for writing to the DB as well as reading). The mapfile is this:
MAP
NAME "postcodes"
STATUS ON
EXTENT -180 -90 180 90
UNITS DD
WEB
METADATA
"tinyows_schema_dir" "/usr/local/share/tinyows/schema/"
"tinyows_onlineresource" "richardt.gis.mediatel.co.uk/wfs"
"wfs_title" "Postcode Data"
"wfs_enable_request" "*"
"wfs_namespace_uri" "http://gis.mediatel.co.uk"
"wfs_namespace_prefix" "mtl"
END
END
PROJECTION
"init=epsg:3857"
END
LAYER
NAME "areas"
METADATA
"wfs_name" "areas"
"wfs_title" "Postcode Areas"
"gml_featureid" "ogc_fid"
"gml_include_items" "all"
"wfs_enable_request" "*"
"tinyows_table" "postcode_area_boundaries"
"tinyows_retrievable" "1"
"tinyows_writable" "1"
"wfs_srs" "EPSG:3857"
END
TYPE POLYGON
STATUS DEFAULT
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=osm user=osm password=osm"
DATA "wkb_geometry FROM postcode_area_boundaries"
DUMP TRUE
END
LAYER
NAME "sectors"
METADATA
"wfs_name" "sectors"
"wfs_title" "Postcode Sectors"
"gml_featureid" "ogc_fid"
"gml_include_items" "all"
"wfs_enable_request" "*"
"tinyows_table" "postcode_sector_boundaries"
"tinyows_retrievable" "1"
"tinyows_writable" "1"
"wfs_srs" "EPSG:3857"
END
TYPE POLYGON
STATUS DEFAULT
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=osm user=osm password=osm"
DATA "wkb_geometry FROM postcode_sector_boundaries"
DUMP TRUE
END
END
Can anyone point me in the right direction here please?
Cheers,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120919/51cc433a/attachment.htm>
More information about the MapServer-users
mailing list