[OpenLayers-Users] Rép. : Re: [WFS] Error insert in geoserver

Patrick Mayrand Patrick.Mayrand at fadq.qc.ca
Fri Jan 8 09:47:51 EST 2010


Hi,
 
http://old.nabble.com/-WFS-T-and-Oracle--Error-performing-insert-td26903498.html#a27076260 
 
A new response in geoserver mailinglist :
 
Hi, 

Schema says: 

    <xsd:choice minOccurs="0" maxOccurs="unbounded"> 
            <xsd:element ref="wfs:Insert"/> 
            <xsd:element ref="wfs:Update"/> 
            <xsd:element ref="wfs:Delete"/> 
            <xsd:element ref="wfs:Native"/> 
         </xsd:choice> 


I do not know how it should be interpreted, but I can imagine that some WFS-T client would like to gather consecutive events during editing session and then sends them as one multirequest. Edits may consern the same feature and in that case only Insert-Update-Delete sequence can work. It is impossible to delete a feature if it has not been created yet, and updating after delete will not work either. I guess that OpenLayers does not send multiple request for the same feature with one transaction but because it would not harm it in any way to sort the requests in order Insert-Update-Delete so why not to do it? 

Meanwhile my colleague made a test with XMLSpy and it validates requests in any order. That speaks for that Geoserver is wrong and OpenLayers right. Or then perhaps both the OGC standard and OpenLayers are wrong :) 

-Jukka Rahkonen- 
 
 
regards,
 
 
Pat

>>> Andreas Hocevar <ahocevar at opengeo.org> 01/07/10 11:06 am >>>
Hi,

this looks like a GeoServer issue. Can you report that in the geoserver
users list? If not let me know, then I'll forward your message.

Regards,
Andreas.

On 2010-01-07 14:49, Patrick Mayrand wrote:
> Hi,
>  
> my layer definition:
>  
>         olWFSParcelle = new OpenLayers.Layer.Vector("Parcelle - WFS-T", {
>             projection: new OpenLayers.Projection("EPSG:32198"),
>             strategies: [new OpenLayers.Strategy.BBOX(), oSaveStrategy],
>             protocol: new OpenLayers.Protocol.WFS({
>                 version:       "1.1.0",
>                 url:           "http://sig.fool.qc/geoserver/wfs 
> <http://mrsig.fadq.qc/geoserver/wfs>",
>                 featureType:   "SAGR_V3",
>                 srsName:       "EPSG:32198",
>                 featurePrefix:  "fadq",
>                 featureNS:     "http://sig.fool.qc/fadq 
> <http://mrsig.fadq.qc/fadq>",
>                 geometryName:  "GEOM",
>                 schema:        "http://sig.fool.qc/geoserver/ 
> <http://mrsig.fadq.qc/geoserver/wfs/DescribeFeatureType?version=1.1.0&srsName=EPSG:32198&TypeName=fadq:SAGR_V3>wfs?service=WFS&version=1.1.0&request=DescribeFeatureTyp&srsName=EPSG:32198&typename=faqd:SAGR_V3
> <http://path/to/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureTyp&typename=faqd:SAGR_V3>"
>             })
>         });
>
> >>> Andreas Hocevar <ahocevar at opengeo.org> 01/07/10 3:26 am >>>
> Hi,
>
> I do not see how the request below would make any difference if the
> order was changed. According to the schema, the Transaction children are
> a 0..* choice, not a sequence.
>
> Can you please also paste the server response to the failing transaction
> request?
>
> Regards,
> Andreas.
>
> The only problem I see with the xml you pasted is that the
> On 2010-01-06 22:34, Patrick Mayrand wrote:
> > Hi,
> > 
> > with OL i use the edition of polygon. A transaction with several
> > operation does not work
> > 
> > GML generate by Openlayers:
> > 
> > <wfs:Transaction 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" ( 'http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"' )
> <http://schemas.opengis.net/wfs/1.1.0/wfs.xsd%22>
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <wfs:Delete typeName="fadq:SAGR_V3"
> > xmlns:fadq="http://sig.fool.qc/fadq"><ogc:Filter (
> > 'http://mrsig.fadq.qc/fadq" )
> > xmlns:ogc="http://www.opengis.net/ogc"><ogc:FeatureId (
> > 'http://www.opengis.net/ogc" )
> > fid="SAGR_V3.17"/></ogc:Filter></wfs:Delete>
> > <wfs:Insert><feature:SAGR_V3
> >
> xmlns:feature="http://sig.fool.qc/fadq"><feature:GEOM><gml:MultiSurface (
> > 'http://sig.fool.qc/fadq" ) xmlns:gml="http://www.opengis.net/gml"
> >
> srsName="EPSG:32198"><gml:surfaceMember><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>-206413.01818846
> > 292765.09570319 -206182.22900389 292089.51281744 -205745.8276367
> > 292269.94799811 -205917.87048338 292479.75634772 -206413.01818846
> >
> 292765.09570319</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember></gml:MultiSurface></feature:GEOM></feature:SAGR_V3></wfs:Insert>
> >
> > </wfs:Transaction>
> > 
> > 
> > The order is:
> > 
> > DELETE - INSERT
> > 
> > 
> > but the order should be reversed and it works
> > 
> > INSERT - DELETE
> > 
> > 
> > It this normal?? a bug??
> > 
> > 
> > regards,
> > 
> > 
> > Pat
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org 
> > http://openlayers.org/mailman/listinfo/users 
> >  
>
>
> -- 
> Andreas Hocevar
> OpenGeo - http://opengeo.org/ 
> Expert service straight from the developers.
>


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/ 
Expert service straight from the developers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100108/a01bfcec/attachment.html


More information about the Users mailing list