Sorted this out myself.
The problem was the "type" property of "element" elements in
DescribeFeatureType. It was not recognized by GDAL. GDAL makes them ok,
but for PostgreSQL data sources I'm using Perl database tools and
obviously need to pay a bit more attention to setting the type.
Ari
On 26.10.2015 09:15, Ari Jolma wrote:
Hi,
I'm developing a WFS server in Perl based on GDAL (i.e., GDAL is
generating the GML the server sends to the client) and I'm testing it
using the GDAL WFS client.
I'm obviously ignorant on some basic issues since I'm getting an error
"Cannot insert feature because we didn't manage to parse the .XSD schema"
which comes from WFSLayer::ICreateFeature.
The test code is very simple:
my $ds = Geo::OGR::DataSource::Open('WFS:http://localhost/TestApp', 1);
my $layer = $ds->GetLayer('local.mittauskohteet2.geom');
my $feature = Geo::OGR::Feature->new($layer->Schema);
$feature->Geometry(Geo::OGR::Geometry->new(WKT=>'POINT (1 2)'));
$feature->Field('koodi' => 'fake');
$layer->CreateFeature($f);
What am I missing?
Best regards,
Ari
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev