banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?
Nom d'utilisateur    Mot de passe              Toujours pas inscrit ?   Mot de passe oublié ?

Annonce

Rencontres QGIS 2025

L'appel à participation est ouvert jusqu'au 19 janvier 2025!

#1 Tue 05 January 2010 20:18

emptiness
Participant occasionnel
Date d'inscription: 12 Aug 2009
Messages: 14

[Openlayers] WFS-T et l'ordre

Salut,

j'ai une application OL qui ajoute, supprime et modifie des polygones. Elle est branché sur Geoserver. Lorsque je fais une transaction avec plusieurs opérations, il ne génère pas le GML dans le bon ordre (INSERT en premier). Il le mets dans l'ordre suivante:

UPDATE - DELETE - INSERT

Ca me donne une erreur avec geoserver. Avez-vous eu ce problème?

Merci

Hors ligne

 

#2 Wed 06 January 2010 15:32

emptiness
Participant occasionnel
Date d'inscription: 12 Aug 2009
Messages: 14

Re: [Openlayers] WFS-T et l'ordre

Peut-etre avec un exemple:


Code:

<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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <wfs:Delete typeName="fadq:SAGR_V3" xmlns:fadq="http://sig.fool.qc/fadq">
        <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
            <ogc:FeatureId fid="SAGR_V3.17"/>
        </ogc:Filter>
    </wfs:Delete>
    <wfs:Insert>
        <feature:SAGR_V3 xmlns:feature="http://sig.fool.qc/fadq">
            <feature:GEOM>
                <gml:MultiSurface 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>

Hors ligne

 

#3 Thu 07 January 2010 15:06

emptiness
Participant occasionnel
Date d'inscription: 12 Aug 2009
Messages: 14

Re: [Openlayers] WFS-T et l'ordre

Peut-etre avec l'erreur que ca génère

Code:

Request: transaction
        handle = null
        service = WFS
        version = 1.1.0
        baseUrl = http://sig.fool.qc:80/geoserver/
        providedVersion = null
        lockId = null
        group = [wfs:delete=net.opengis.wfs.impl.DeleteElementTypeImpl@3028e92e (filter: [ SAGR_V3.17 ], handle: null, typeName: {http://sig.fool.qc/fadq}SAGR_V3), wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@4de4e3b5 (feature: [SimpleFeatureImpl:SAGR_V3=[SimpleFeatureImpl.Attribute: GEOM<GEOM id=fid--20068e19_12592a87d6b_6e15>=MULTIPOLYGON (((-206413.01818846 292765.09570319, -206182.22900389 292089.51281744, -205745.8276367 292269.94799811, -205917.87048338 292479.75634772, -206413.01818846 292765.09570319))), SimpleFeatureImpl.Attribute: NAME<NAME id=fid--20068e19_12592a87d6b_6e15>=null]], handle: null, idgen: <unset>, inputFormat: <unset>, srsName: null)]
        insert = [net.opengis.wfs.impl.InsertElementTypeImpl@4de4e3b5 (feature: [SimpleFeatureImpl:SAGR_V3=[SimpleFeatureImpl.Attribute: GEOM<GEOM id=fid--20068e19_12592a87d6b_6e15>=MULTIPOLYGON (((-206413.01818846 292765.09570319, -206182.22900389 292089.51281744, -205745.8276367 292269.94799811, -205917.87048338 292479.75634772, -206413.01818846 292765.09570319))), SimpleFeatureImpl.Attribute: NAME<NAME id=fid--20068e19_12592a87d6b_6e15>=null]], handle: null, idgen: <unset>, inputFormat: <unset>, srsName: null)]
        update = []
        delete = [net.opengis.wfs.impl.DeleteElementTypeImpl@3028e92e (filter: [ SAGR_V3.17 ], handle: null, typeName: {http://sig.fool.qc/fadq}SAGR_V3)]
        native = []
        releaseAction = ALL
 
org.geoserver.wfs.WFSException: Error performing insert
        at org.geoserver.wfs.response.TransactionResponse.v_1_1(TransactionResponse.java:197)
        at org.geoserver.wfs.response.TransactionResponse.write(TransactionResponse.java:67)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:705)
        at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:213)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
        at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:619)

Si j'ote le delete ca marche.
Si je mets le delete à la fin, ca marche.

Dernière modification par emptiness (Thu 07 January 2010 15:07)

Hors ligne

 

#4 Thu 07 January 2010 19:55

emptiness
Participant occasionnel
Date d'inscription: 12 Aug 2009
Messages: 14

Hors ligne

 

#5 Tue 19 January 2010 16:21

emptiness
Participant occasionnel
Date d'inscription: 12 Aug 2009
Messages: 14

Re: [Openlayers] WFS-T et l'ordre

Hors ligne

 

#6 Tue 19 January 2010 16:28

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] WFS-T et l'ordre

Merci emptiness !

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

Pied de page des forums

Powered by FluxBB