[OpenLayers-Users] WFS-T update problem with namespaces

Tim Schaub tschaub at opengeo.org
Wed Jun 4 14:13:04 EDT 2008


Hey-

2StepForward wrote:
> Hello List,
> 
> if have read many posts about WFS-T transaction and update/delete features,
> but can't solve my problem.
> If i try the transaction_update demo request in GeoServer demo with some
> manipulations to my featuretype, everything works fine.
> 
> Like this:
> 
> <wfs:Transaction service="WFS" version="1.0.0"
>   xmlns:WFS="http://www.own-namespace.de/wfs"      -> this is the import of
> my own namespace from GS
>   xmlns:ogc="http://www.opengis.net/ogc"
>   xmlns:wfs="http://www.opengis.net/wfs">
>   xmlns:gml="http://www.opengis.net/gml"
>   <wfs:Update typeName="WFS:info">
>     <wfs:Property>
>       <wfs:Name>the_geom</wfs:Name>
>       <wfs:Value>
>       <gml:Point srsName="EPSG:23032">
>       <gml:coordinates decimal="." cs="," ts="
> ">662043.2646366811,5798981.532771344</gml:coordinates>
>       </gml:Point>
>       </wfs:Value>
>     </wfs:Property>
>     <ogc:Filter>
>       <ogc:FeatureId fid="info.1"/>
>     </ogc:Filter>
>   </wfs:Update>
> </wfs:Transaction>
> 
> But if I take a commit of my WFS layer and that feature type, than i can
> sniff these xml transaction code:
> 
> <wfs:Transaction version="1.0.0" service="WFS"
> xmlns:wfs="http://www.opengis.net/wfs">
>  <wfs:Update typeName="WFS:em">
>   <wfs:Property>
>    <wfs:Name>the_geom</wfs:Name>
>    <wfs:Value>
>     <gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:23032">
>     <gml:coordinates decimal="." cs="," ts="
> ">662043.2646366811,5798981.532771344</gml:coordinates>
>     </gml:Point>
>    </wfs:Value>
>   </wfs:Property>
>    <ogc:Filter>
>      <ogc:FeatureId fid="info.1"/>
>    </ogc:Filter>
>  </wfs:Update>
> </wfs:Transaction>
> 
> and i get, I think this might be right, a error window which said "WFS is
> not bind to a namespace".
> If I think right, it meens the WFS namespace prefix of my featuretype which
> should bind to the:
> 
> xmlns:WFS="http://www.own-namespace.de/wfs"
> 
> namespace definition. But there isn't any definition of my own in GS defined
> namespace.
> 

Yes, you are hitting a known bug with the WFS stuff in OpenLayers.  This 
particular problem will be solved with the new WFS protocol (which will 
write out the xmlns attribute for the feature type namespace alias).

> Where I can set a option in the WFS Layer, who bind this prefix to the
> namespace in the request?
> Or is any logic, where I understand this model of xml request wrong?
> I have tried to set the featureNS to my own namespace, but this option I
> think has no effect, isn't it?
> The solved problem with the layerName in WFS-Format-JS, which is set to the
> featuretype.
> 
> Has anyone a idea, I'm shortly befor to hit my head on the wall....

So, with apologies for the frustration, you'll have to wait a while 
before the WFS/GML facelift makes it in to the trunk.

Tim

> 
> Thanks Klaus 




More information about the Users mailing list