<br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>I am trying to implement WFS-T support to Mapserver so I am using TinyOWS 1.0. Requests are being made to server and it seems to work correctly, I am getting a correct xml response. Anyway, features are not being displayed on an Openlayers implementation.<br>
Here is my tinyows.xml<br><br><tinyows online_resource="<a href="http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows" target="_blank">http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows</a>" <br> schema_dir="/usr/local/share/tinyows/schema/"<br>
log="/tmp/tinyows.log"<br> log_level="1"<br> check_schema="0"><br><br> <pg host="172.16.3.240" user="postgres" password="postgres" dbname="molleres2" port="5432"/><br>
<br> <metadata name="TinyOWS Server"<br> title="TinyOWS Server - WFS-T Frida Service" /><br><br> <contact name="TinyOWS Server"<br> site="<a href="http://molleresdevel.eurogeotecnica.com/" target="_blank">http://molleresdevel.eurogeotecnica.com/</a>"<br>
email="<a href="mailto:tinyows-users@lists.maptools.org" target="_blank">tinyows-users@lists.maptools.org</a>" /><br><br> <layer retrievable="1"<br> writable="1"<br>
ns_prefix="molleres"<br>
ns_uri="<a href="http://molleresdevel.eurogeotecnica.com/" target="_blank">http://molleresdevel.eurogeotecnica.com/</a>"<br> schema="gis_schema"<br> name="molleres_shp"<br>
title="molleres" /><br>
<br></tinyows><br><br>And here you can see my openlayers code which is very close to this example <a href="http://openlayers.org/dev/examples/wfs-protocol-transactions.html" target="_blank">http://openlayers.org/dev/examples/wfs-protocol-transactions.html</a><br>
<br> <script type="text/javascript"><br> var map, wfs;<br> //OpenLayers.ProxyHost = "proxy.cgi?url=";<br><br> var DeleteFeature = OpenLayers.Class(OpenLayers.Control, {<br> initialize: function(layer, options) {<br>
OpenLayers.Control.prototype.initialize.apply(this, [options]);<br> this.layer = layer;<br> this.handler = new OpenLayers.Handler.Feature(<br> this, layer, {click: this.clickFeature}<br>
);<br> },<br> clickFeature: function(feature) {<br> // if feature doesn't have a fid, destroy it<br> if(feature.fid == undefined) {<br> this.layer.destroyFeatures([feature]);<br>
} else {<br> feature.state = OpenLayers.State.DELETE;<br> this.layer.events.triggerEvent("afterfeaturemodified",<br> {feature: feature});<br>
feature.renderIntent = "select";<br> this.layer.drawFeature(feature);<br> }<br> },<br> setMap: function(map) {<br> this.handler.setMap(map);<br>
OpenLayers.Control.prototype.setMap.apply(this, arguments);<br> },<br> CLASS_NAME: "OpenLayers.Control.DeleteFeature"<br> });<br><br> function init() {<br><br> var extent = new OpenLayers.Bounds(<br>
521500,15000,556500,40000<br> );<br><br><br> map = new OpenLayers.Map('map', {<br> projection: new OpenLayers.Projection("EPSG:27573"),<br> //displayProjection: new OpenLayers.Projection("EPSG:4326"),<br>
units: "m",<br> //maxResolution: 20037508.34 / 128,<br> maxResolution: 'auto',<br> maxExtent: new OpenLayers.Bounds(521500, 15000, 556500, 40000),<br> restrictedExtent: extent,<br>
controls: [<br> new OpenLayers.Control.PanZoom(),<br> new OpenLayers.Control.Navigation()<br> ]<br> });<br><br> var resolutions = [68.359375,34.1796875,17.08984375,8.544921875,4.2724609375,2.13623046875,1.068115234375]; // m/pixel<br>
<br><br> var orto_andorra = new OpenLayers.Layer.WMS("Ortofoto", "<a href="http://www.ideandorra.ad/wmsorto2003/request.aspx" target="_blank">http://www.ideandorra.ad/wmsorto2003/request.aspx</a>?", {layers: "masaic_5m"},{isBaseLayer: true, resolutions: resolutions, transitionEffect:'resize'} )<br>
<br><br> var saveStrategy = new OpenLayers.Strategy.Save();<br><br> <br><br> var wfs = new OpenLayers.Layer.Vector("molleres", {<br> strategies: [new OpenLayers.Strategy.BBOX(),saveStrategy],<br>
projection: new OpenLayers.Projection("EPSG:27573"),<br> protocol: new OpenLayers.Protocol.WFS({<br> version: "1.1.0",<br>
url: "<a href="http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows" target="_blank">http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows</a>",<br> featureType: "molleres_shp",<br>
srsName: "EPSG:27573",<br> featureNS: "<a href="http://molleresdevel.eurogeotecnica.com" target="_blank">http://molleresdevel.eurogeotecnica.com</a>",<br>
geometryName: "the_geom",<br> schema: "<a href="http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=og:molleres_shp" target="_blank">http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=og:molleres_shp</a>"<br>
<br> })<br> },{<br> minResolution: 1.068115234375<br> });<br><br> map.addLayers([orto_andorra, wfs]);<br><br> var panel = new OpenLayers.Control.Panel({<br>
displayClass: 'customEditingToolbar',<br> allowDepress: true<br> });<br><br> var draw = new OpenLayers.Control.DrawFeature(<br> wfs, OpenLayers.Handler.Polygon,<br>
{<br>
title: "Draw Feature",<br> displayClass: "olControlDrawFeaturePolygon",<br> multi: true<br> }<br> );<br><br> var edit = new OpenLayers.Control.ModifyFeature(wfs, {<br>
title: "Modify Feature",<br> displayClass: "olControlModifyFeature"<br> });<br><br> var del = new DeleteFeature(wfs, {title: "Delete Feature"});<br><br> var save = new OpenLayers.Control.Button({<br>
title: "Save Changes",<br> trigger: function() {<br> if(edit.feature) {<br> edit.selectControl.unselectAll();<br> }<br> saveStrategy.save();<br>
},<br> displayClass: "olControlSaveFeatures"<br> });<br><br> panel.addControls([save, del, edit, draw]);<br> map.addControl(panel);<br> map.zoomToExtent(extent, true);<br>
}<br><br></script><br><br>Server is giving this response<br><br><pre><code><?xml version='1.0' encoding='UTF-8'?><br></code><code><wfs:FeatureCollection<br>
</code><code> xmlns:molleres='<a href="http://molleresdevel.eurogeotecnica.com/" target="_blank">http://molleresdevel.eurogeotecnica.com/</a>'<br></code><code> xmlns:wfs='<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>'<br>
</code><code> xmlns:xsi='<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>'<br></code><code> xmlns:gml='<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>'<br>
</code><code> xmlns:xsd='<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>'<br></code><code> xmlns:ogc='<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.net/ogc</a>'<br>
</code><code> xmlns:xlink='<a href="http://www.w3.org/1999/xlink" target="_blank">http://www.w3.org/1999/xlink</a>'<br></code><code> xmlns:ows='<a href="http://www.opengis.net/ows" target="_blank">http://www.opengis.net/ows</a>'<br>
</code><code> xsi:schemaLocation='<a href="http://molleresdevel.eurogeotecnica.com/" target="_blank">http://molleresdevel.eurogeotecnica.com/</a><br></code><code> <a href="http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows?service=WFS&version=1.1.0&request" target="_blank">http://molleresdevel.eurogeotecnica.com/cgi-bin/tinyows?service=WFS&amp;version=1.1.0&amp;request</a></code><code>=DescribeFeatureType&amp;Typename=molleres:molleres_shp <a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a><br>
</code><code> <a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" target="_blank">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd</a><br></code><code> <a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a><br>
</code><code> <a href="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd" target="_blank">http://schemas.opengis.net/gml/3.1.1/base/gml.xsd</a>'<br></code><code>><br></code><code><gml:boundedBy><br>
</code><code> <gml:Envelope srsName="EPSG:27573"><gml:lowerCorner>524801.062500 <a href="tel:17249.105469" value="+17249105469" target="_blank">17249.105469</a></gml:lowerCorner><gml</code><code>:upperCorner>554734.750000 39483.292969</gml:upperCorner></gml:Envelope><br>
</code><code></gml:boundedBy><br></code><code> <gml:featureMember><br></code><code> <molleres:molleres_shp gml:id="molleres_shp.1"><br>
</code><code> <molleres:codi>02153058</molleres:codi><br></code><code> <molleres:nom>Bosc de l&#39;Estall Serrer I</molleres:nom><br>
</code><code> <molleres:the_geom><gml:MultiSurface srsName="EPSG:27573"><gml:surfaceMember><gml:Polygon><gml:exterior</code><code>><gml:LinearRing><gml:posList srsDimension="2">540193 20490 540206 20484 540203 20476 540198 20467 540195</code><code> 20458 540192 20450 540188 20446 540188 20439 540184 20437 540183 20445 540184 20457 540188 20472 540191</code><code> 20480 540193 20490 540193 20490</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember</code><code>></gml:MultiSurface></molleres:the_geom><br>
</code><code> </molleres:molleres_shp><br></code><code> </gml:featureMember><br></code><code> <gml:featureMember><br>
</code><code> <molleres:molleres_shp gml:id="molleres_shp.2"><br></code><code> <molleres:codi>02153070</molleres:codi><br></code><code> <molleres:nom>Pleta de la Trava</molleres:nom><br>
</code><code> <molleres:the_geom><gml:MultiSurface srsName="EPSG:27573"><gml:surfaceMember><gml:Polygon><gml:exterior</code><code>><gml:LinearRing><gml:posList srsDimension="2">541244 20657 541237 20656 541231 20667 541215 20676 541211</code><code> 20683 541213 20691 541212 20696 541210 20704 541207 20714 541207 20723 541210 20730 541215 20735 541225</code><code> 20737 541227 20731 541225 20722 541222 20712 541219 20703 541221 20694 541232 20689 541251 20668 541244</code><code> 20657 541244 20657</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember><</code><code>/gml:MultiSurface></molleres:the_geom><br>
</code><code> </molleres:molleres_shp><br></code><code> </gml:featureMember><br></code><code> <gml:featureMember><br>
</code><code> <molleres:molleres_shp gml:id="molleres_shp.3"><br></code><code> <molleres:codi>02153071</molleres:codi><br></code><code> <molleres:nom>Pleta de la Trava II</molleres:nom><br>
</code><code> <molleres:the_geom><gml:MultiSurface srsName="EPSG:27573"><gml:surfaceMember><gml:Polygon><gml:exterior</code><code>><gml:LinearRing><gml:posList srsDimension="2">541353 20618 541356 20610 541357 20603 541357 20599 541355</code><code> 20598 541353 20597 541348 20592 541343 20590 541336 20590 541335 20595 541338 20602 541337 20606 541342</code><code> 20612 541349 20619 541353 20618 541353 20618</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon</code><code>></gml:surfaceMember></gml:MultiSurface></molleres:the_geom><br>
</code><code> </molleres:molleres_shp><br></code><code> </gml:featureMember><br></code><code> <gml:featureMember><br>
</code><code> <molleres:molleres_shp gml:id="molleres_shp.4"><br></code><code> <molleres:codi>02154160</molleres:codi><br></code><code> <molleres:nom>Basses de Setut IV</molleres:nom><br>
</code><code> <molleres:the_geom><gml:MultiSurface srsName="EPSG:27573"><gml:surfaceMember><gml:Polygon><gml:exterior</code><code>><gml:LinearRing><gml:posList srsDimension="2">543025 20458 543034 20454 543040 20453 543043 20450 543050</code><code> 20447 543053 20440 543062 20434 543065 20430 543074 20428 543083 20428 543086 20430 543089 20434 543091</code><code> 20437 543093 20440 543096 20443 543099 20447 543101 20448 543105 20450 543107 20450 543113 20451 543114</code><code> 20451 543117 20453 543121 20456 543126 20457 543128 20456 543132 20454 543135 20452 543138 20450 543145</code><code> 20448 543147 20447 543152 20447 543165 20448 543175 20448 543178 20438 543178 20434 543177 20428 543176</code><code> 20426 543176 20423 543175 20419 543173 20416 543170 20412 543165 20408 543162 20405 543157 20400 543155</code><code> 20399 543152 20398 543150 20392 543149 20388 543147 20385 543144 20382 543132 20382 543129 20383 543124</code><code> 20386 543123 20381 543120 20371 543116 20366 543111 20363 543107 20360 543106 20357 543108 20355 543112</code><code> 20353 543114 20351 543111 20349 543110 20348 543108 20345 543098 20347 543095 20357 543088 20357 543082</code><code> 20359 543074 20368 543073 20372 543072 20383 543069 20392 543064 20397 543064 20401 543060 20408 543054</code><code> 20410 543047 20413 543041 20413 543031 20408 543021 20404 543012 20401 543010 20397 543005 20397 542996</code><code> 20402 542992 20409 542990 20424 542990 20434 542995 20444 542996 20445 542996 20446 542996 20447 542997</code><code> 20448 542997 20449 542997 20451 542998 20452 542998 20452 542999 20453 543000 20454 543001 20454 543002</code><code> 20455 543003 20455 543004 20456 543005 20456 543015 20455 543022 20459 543025 20458 543025 20458</gml</code><code>:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember></gml:MultiSurface></molleres</code><code>:the_geom><br>
</code><code> </molleres:molleres_shp><br></code><code> </gml:featureMember><br></code><code> <gml:featureMember><br>
</code><code> <molleres:molleres_shp gml:id="molleres_shp.5"><br></code><code> <molleres:codi>02154158</molleres:codi><br></code><code> <molleres:nom>Basses de Setut II</molleres:nom><br>
</code><code> <molleres:the_geom><gml:MultiSurface srsName="EPSG:27573"><gml:surfaceMember><gml:Polygon><gml:exterior</code><code>><gml:LinearRing><gml:posList srsDimension="2">543209 20372 543215 20373 543221 20373 543229 20373 543234</code><code> 20371 543240 20365 543246 20360 543246 20353 543245 20346 543244 20341 543247 20336 543251 20330 543254</code><code> 20324 543259 20317 543262 20314 543258 20312 543253 20316 543247 20323 543241 20328 543235 20335 543234</code><code> 20345 543240 20346 543240 20352 543238 20358 543229 20360 543224 20363 543208 20368 543209 20372 543209</code><code> 20372</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember></gml:MultiSurface</code><code>></molleres:the_geom><br>
</code><code> </molleres:molleres_shp><br></code><code> </gml:featureMember><br></code><code> <gml:featureMember><br>
</code><code> <molleres:molleres_shp gml:id="molleres_shp.6"><br></code><code> <molleres:codi>02154157</molleres:codi><br></code><code> <molleres:nom>Basses de Setut I</molleres:nom><br>
</code><code> <molleres:the_geom><gml:MultiSurface srsName="EPSG:27573"><gml:surfaceMember><gml:Polygon><gml:exterior</code><code>><gml:LinearRing><gml:posList srsDimension="2">543261 20304 543262 20298 543263 20294 543263 20290 543261</code><code> 20281 543257 20278 543256 20270 543259 20260 543258 20251 543254 20244 543254 20245 543249 20240 543245</code><code> 20236 543244 20233 543245 20228 543246 20221 543244 20217 543242 20211 543239 20209 543231 20213 543225</code><code> 20223 543230 20234 543232 20243 543225 20248 543217 20255 543228 20252 543235 20252 543240 20257 543244</code><code> 20265 543246 20272 543252 20279 543257 20287 543259 20295 543261 20304 543261 20304</gml:posList></gml</code><code>:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember></gml:MultiSurface></molleres:the_geom><br>
<br>....<br></code></pre>So as I said, it seems to get a proper response.<br><br>Any help will be sincerely appreciated.<br><br>Regards,<br><br>
</blockquote></div><br>