[mapserver-users] TinyOWS wrong call in OpenLayers - 'InvalidParameterValue' - XML request isn't valid

Riccardo Gaeta riccardog79 at gmail.com
Tue Oct 16 08:28:29 PDT 2012


Hi all,
I'm using Tinyows 1.0.0 on win7 machine, postgresql 9.1 and postgis 1.5.5.
All seems to work well, I mean:

1)
http://127.0.0.1:8080/cgi-bin/tinyows.exe?service=WFS&request=DescribeFeatureType&version=1.0.0
Give a good answer

2)
http://localhost:8080/cgi-bin/tinyows.exe?service=wfs&version=1.0.0&request=getfeature&typename=posti_geom&maxfeatures=1
Give a good answer

3) QGIS is capable to retrieve and plot the data (points)

So, the problems:

A) I'm not able from the shell of windows to launchcorrectly:
.\tinyows.exe --check
I get always the same error:
"Unable to open config file"
But maybe is a Windows error, because as I said by browser I'm pretty able
to retrieve the information I need.

B) Most important, I'm not able to have my data on OpenLayers!
Looking at tinyows.log I had these error messages:

[ERROR] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to
locate a schema at location '
http://127.0.0.1:8080/cgi-bin/tinyows.exe?service=WFS&request=DescribeFeatureType&version=1.1.0'.
Skipping the import.

[ERROR] Element '{http://www.opengis.net/wfs}GetFeature': No matching
global declaration available for the validation root.

And finally:
[ERROR] XML request isn't valid

The call made by TinyOws to retrieve the layer in OpenLayers seems to be
(from tinyows.log):
[QUERY] <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"
service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"><wfs:Query
typeName="feature:posti_geom" srsName="EPSG:4326" xmlns:feature="
http://localhost:8080/"/></wfs:GetFeature>

But I'm not trying to retrieve the data in EPSG:4326, but in 3875 (or
900913)!

Anyway, on the other side, in Apache error.log, I get:
[client 127.0.0.1] error : No such file or directory\r, referer:
http://localhost:8080/mappa.html
[error] [client 127.0.0.1] I/O warning : failed to load external entity "
http://127.0.0.1:8080/cgi-bin/tinyows.exe?service=WFS&request=DescribeFeatureType&version=1.0.0"\r,
referer: http://localhost:8080/mappa.html

And, from the browser, I get the following response message:
<?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='request'>
  <ows:ExceptionText>XML request isn't valid</ows:ExceptionText>
 </ows:Exception>
</ows:ExceptionReport>


I don't know what to do, things seems to work fine except on OpenLayers...


I call the tiny_layer in OpenLayers like that:
var points = new OpenLayers.Layer.Vector("punti prova", {
strategies: [new OpenLayers.Strategy.Fixed()],
projection: new OpenLayers.Projection("EPSG:900913"),
protocol: new OpenLayers.Protocol.WFS({
url: "http://localhost:8080/cgi-bin/tinyows.exe?",
version: "1.1.0",
featureType: "posti_geom",
featureNS: "http://localhost:8080/",
readFormat: new OpenLayers.Format.GML({
                    'internalProjection': new
OpenLayers.Projection("EPSG:900913"),
                    'externalProjection': new
OpenLayers.Projection("EPSG:900913")
        })
})
});

The map is in 900913, with OSM as base layer (the OSM map is loaded without
problem).


Finally my config.xml file:
<tinyows online_resource="http://127.0.0.1:8080/cgi-bin/tinyows.exe"
schema_dir="C:\PostgreSQL\EnterpriseDB-ApachePHP\apache\www\tinyows\schema\"
log="C:\PostgreSQL\EnterpriseDB-ApachePHP\apache\logs\tinyows.log"
log_level="7">

<pg host="localhost" user="***" password="***" dbname="***" port="5432"/>
<metadata name="TinyOWS Server" title="TinyOWS Server - Demo Service" />

<layer retrievable="1"
queryable="1"
writable="0"
ns_prefix="tows"
ns_uri="http://localhost:8080/"
server="http://localhost:8080/"
name="posti_geom"
title="posti_geom_tiny"
schema="public"
srid="900913,3857,4326" />

</tinyows>

Thanks for any help!!!!!

Riccardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121016/169b5b4e/attachment.html>


More information about the mapserver-users mailing list