[OpenLayers-Users] Adding Feature to WFS in Vector Layer / Copying Features
Fabian Patzke
patzke at geoinformationsdienst.de
Wed Aug 5 07:44:31 EDT 2009
Fabian Patzke <patzke at ...> writes:
If it helps this is the POST request made to my WFS:
<wfs:Transaction
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.FOO.BLA
http://FOO:8080/geoserver/wfs?Service=WFS&Request=DescribeFeatureType&version=1.0.0&typename=foo:bla"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
/>
And the Response:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:WFS_TransactionResponse version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://FOO:8080/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd">
<wfs:InsertResult>
<ogc:FeatureId fid="none"/>
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:Status>
<wfs:SUCCESS/>
</wfs:Status>
</wfs:TransactionResult>
</wfs:WFS_TransactionResponse>
A working Transaction POST request (after drawing a new feature):
So there must something wrong with commiting the newly added feature, I guess :)
<wfs:Transaction
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.FOO.BLA
http://FOO:8080/geoserver/wfs?Service=WFS&Request=DescribeFeatureType&version=1.0.0&typename=foo:bla"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Insert>
<feature:bla xmlns:feature="http://www.FOO.BLA">
<feature:the_geom>
<gml:MultiPolygon
xmlns:gml="http://www.opengis.net/gml"
srsName="EPSG:31467">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs=","ts="
">3477069.1826687,5883961.3605044 3476363.6274941,5883961.3605044
3522224.7138402,5827516.9465399 3559619.1380917,5892428.0225991
3477069.1826687,5883961.3605044</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</feature:the_geom>
</feature:a_20090805_101153_polygon>
</wfs:Insert>
</wfs:Transaction>
And working response:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:WFS_TransactionResponse version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://FOO:8080/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd">
<wfs:InsertResult>
<ogc:FeatureId fid="bla.161"/>
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:Status>
<wfs:SUCCESS/>
</wfs:Status>
</wfs:TransactionResult>
</wfs:WFS_TransactionResponse>
More information about the Users
mailing list