(please keep questions on the public mailing list)
I think this may be some confusion in terminology with the spec. And if i remember properly this is something that come up when we were implementing the wfs 1.1 reference implementation.
However, if you look at the wfs schema:
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd
The multiplicity on InsertResults is one, so one InsertResults per Insert would not be schema valid.
For an absolute answer, you may want to bring this up on the wfs-dev mailing list.
-Justin
CB wrote:
Hmm. I'm looking at the 1.0.0 spec, and found this:
"The <InsertResult> element contains one or more feature identifiers of newly created feature instances. *One <InsertResult> element is reported per <Insert> element* in the request. The insert results are reported in the order in which the <Insert> operations were contained in the <Transaction> element. Additionally, they can be correlated using the handle attribute if it was specified."
As my original response showed, though, I am getting on InsertResult with mulitible fids listed.
The spec goes on to say the 'handle' attribute can be used to correlate the user's record and the new fid, but that won't work with a response like this:
<wfs:InsertResult handle="31">
<ogc:FeatureId fid="new0"/>
<ogc:FeatureId fid="new1"/>
</wfs:InsertResult>wfs:InsertResult handle="31">
<ogc:FeatureId fid="new0"/>
<ogc:FeatureId fid="new1"/>
</wfs:InsertResult>ogc:FeatureId fid="new0"/>
<ogc:FeatureId fid="new1"/>
</wfs:InsertResult>ogc:FeatureId fid="new1"/>
</wfs:InsertResult>/wfs:InsertResult>
On Tue, Mar 18, 2008 at 10:56 PM, Justin Deoliveira <jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>> wrote:
Hi,
What your seeing back is the correct response for a wfs 1.0 insert. What
you need to do is change the "version" attribute on the root element
to "1.1.0".
Also, it is probably a good idea to use GML3 style geometries. IE.
gml:coordinates -> gml:posList. Although what you have should work too,
but is deprecated in gml3.
Let us know if that works.
-Justin
CB wrote:
> Hello,
>
> I am sending this request to GeoServer 1.6:
>
> <
>
> ?xml *version*="1.0" ?>
>
> <
>
> *wfs:Transaction
>
> version
>
> *="1.0.0"*
>
> service
>
> *="WFS"*
>
> xmlns:wfs
>
> *="http://www.opengis.net/wfs"
>
> /<!-- lots of ns snipped -->/
>
> <
>
> *wfs:Insert* *xmlns:wfs*="http://www.opengis.net/wfs"
> *idGen*="GenerateNew" *handle*="6">
>
> <
>
> *tiger:tiger_roads* *xmlns:tiger*="http://www.census.gov
<http://www.census.gov/>">
>
> <
>
> *tiger:the_geom*>
>
> <
>
> *gml:MultiLineString* *xmlns:gml*="http://www.opengis.net/gml"
> *srsName*="EPSG:4326">
>
> <
>
> *gml:lineStringMember*>
>
> <
>
> *gml:LineString*>
>
> <
>
> *gml:coordinates*>-73.991907,40.734672
> -73.991929,40.733904<*/gml:coordinates*>
>
> <
>
> */gml:LineString*>
>
> <
>
> */gml:lineStringMember*>
>
> <
>
> */gml:MultiLineString*>
>
> <
>
> */tiger:the_geom*>
>
> <
>
> *CFCC*>Z99<*/CFCC*>
>
> <
>
> *NAME*>Blow<*/NAME*>
>
> <
>
> */tiger:tiger_roads*>
>
> <
>
> */wfs:Insert*>
>
> <
>
> *wfs:Insert* *xmlns:wfs*="http://www.opengis.net/wfs"
> *idGen*="GenerateNew" *handle*="7">
>
> <
>
> *tiger:tiger_roads* *xmlns:tiger*="http://www.census.gov
<http://www.census.gov/>">
>
> <
>
> *tiger:the_geom*>
>
> <
>
> *gml:MultiLineString* *xmlns:gml*="http://www.opengis.net/gml"
> *srsName*="EPSG:4326">
>
> <
>
> *gml:lineStringMember*>
>
> <
>
> *gml:LineString*>
>
> <
>
> *gml:coordinates*>-73.991411,40.734604
> -73.991185,40.733818<*/gml:coordinates*>
>
> <
>
> */gml:LineString*>
>
> <
>
> */gml:lineStringMember*>
>
> <
>
> */gml:MultiLineString*>
>
> <
>
> */tiger:the_geom*>
>
> <
>
> *CFCC*>Z99<*/CFCC*>
>
> <
>
> *NAME*>Suck<*/NAME*>
>
> <
>
> */tiger:tiger_roads*>
>
> <
>
> */wfs:Insert*>
>
> <
>
> */wfs:Transaction*>
>
> I get this 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://69.54.29.26:8080/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd">
>
> <
>
> wfs:InsertResult handle="6">
>
> <*ogc:FeatureId*
>
> *fid*="new0"/>
>
> <
>
> *ogc:FeatureId* *fid*="new1"/>
>
> <
>
> /wfs:InsertResult>
>
> <
>
> wfs:TransactionResult>
>
> <
>
> wfs:Status>
>
> <
>
> wfs:SUCCESS/>
>
> <
>
> /wfs:Status>
>
> <
>
> /wfs:TransactionResult>
>
> <
>
> /wfs:WFS_TransactionResponse>
>
> I was expecting: a TransactionSummary; and a separate
InsertResult for
> each feature.
>
> What am I doing wrong in my request?
>
> Thanks.
>
------------------------------------------------------------------------
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
> !DSPAM:4007,47e05a15158251961014482!
>
------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
<mailto:Geoserver-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:4007,47e05a15158251961014482!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4007,47e15168165195219720167!