[TinyOWS-users] Problems saving with demo

Nicolas Ardissono nicolasardissono at yahoo.com.ar
Thu Nov 3 16:41:28 EST 2011


So, the problem must be openlayers. If you can add and remove features 
with qgis. I don't know where to look for.


El 31/10/11 12:01, Gissur Þórhallsson escribió:
> Hello Nicolas,
>
> What does the log on the server say? I've also found it very helpful 
> to also fiddle with the *log_level* parameters and see what pops out.
> Refer to http://www.tinyows.org/trac/wiki/ConfigFile for how to 
> configure logging.
>
> I can on the other hand verify that your WFS is working fine - since I 
> could connect to it from qgis and add/remove an island to the Faroe 
> Islands.
>
> Kind regards,
> Gissur
>
> On Mon, Oct 31, 2011 at 3:41 AM, Nicolas Ardissono 
> <nicolasardissono at yahoo.com.ar <mailto:nicolasardissono at yahoo.com.ar>> 
> wrote:
>
>     Hello, i'm a newy in this matter, and after a week i have
>     installed the tinyows demo in my server (debian squeeze) and i
>     could make it work, all layers are showing, but i cannot make it
>     save.
>
>     Any tip or help will be apreciate. I don't know what else try, i
>     have no more ideas.
>
>     When i edit same features and click save this is what *firebug post*:
>
>     <wfs:Transaction xmlns:wfs="http://www.opengis.net/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://www.agpstracking.com/
>     http://www.agpstracking.com/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=france"
>     <http://www.opengis.net/wfshttp://schemas.opengis.net/wfs/1.1.0/wfs.xsdhttp://www.agpstracking.com/http://www.agpstracking.com/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=france>
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance>>
>     <wfs:Update typeName="feature:france"
>     xmlns:feature="http://www.agpstracking.com/"
>     <http://www.agpstracking.com/>>
>     <wfs:Property>
>     <wfs:Name>the_geom</wfs:Name>
>     <wfs:Value>
>     <gml:MultiSurface xmlns:gml="http://www.opengis.net/gml"
>     <http://www.opengis.net/gml> srsName="EPSG:27582">
>     <gml:surfaceMember>
>     <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"
>     <http://www.opengis.net/ogc>>
>     <ogc:FeatureId></ogc:FeatureId>
>     </ogc:Filter>
>     </wfs:Update>
>     </wfs:Transaction>
>
>
>     *this is the tinyows response in firebug:*
>
>     |<?xml version='1.0' encoding='UTF-8'?>
>     ||<ows:ExceptionReport
>     ||  xmlns='http://www.opengis.net/ows'
>     ||  xmlns:ows='http://www.opengis.net/ows'
>     ||  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>     ||  xsi:schemaLocation='http://www.opengis.net/ows  http://schemas.opengis.net/ows/1.0.0/owsExceptionReport||.xsd'
>     ||  version='1.1.0' language='en'>
>     ||  <ows:Exception exceptionCode='InvalidParameterValue' locator='request'>
>     ||   <ows:ExceptionText>XML request isn't valid</ows:ExceptionText>
>     ||  </ows:Exception>
>     ||</ows:ExceptionReport>|
>
>
>
>     This is what i have   in:
>     */etc/tinyows.xml:*
>     <tinyows
>     online_resource="http://www.agpstracking.com/cgi-bin/tinyows"
>     <http://www.agpstracking.com/cgi-bin/tinyows>
>              schema_dir="/usr/local/share/tinyows/schema/"
>     log_level="1" log="/var/log/tinyows.log">
>
>     <pg host="127.0.0.1" user="remise" password="12346"
>     dbname="tinyows_demo" port="5433"/>
>
>     <metadata name="TinyOWS Server"
>                 title="TinyOWS Server - Demo Service" />
>
>     <layer retrievable="1"
>              writable="1"
>              ns_prefix="tows"
>              ns_uri="http://www.agpstracking.com/"
>     <http://www.agpstracking.com/>
>              name="france"
>              server="http://www.agpstracking.com/"
>     <http://www.agpstracking.com/>
>              title="French Administrative Sub Boundaries (IGN - GeoFLA
>     Departements)" />
>
>     </tinyows>
>
>
>     *this is the javascript file:*
>
>     var map, wfs;
>
>     var DeleteFeature = OpenLayers.Class(OpenLayers.Control, {
>         initialize: function(layer, options) {
>             OpenLayers.Control.prototype.initialize.apply(this,
>     [options]);
>             this.layer = layer;
>             this.handler = new OpenLayers.Handler.Feature(
>                 this, layer, {click: this.clickFeature}
>             );
>         },
>         clickFeature: function(feature) {
>             // if feature doesn't have a fid, destroy it
>             if(feature.fid == undefined) {
>                 this.layer.destroyFeatures([feature]);
>             } else {
>                 feature.state = OpenLayers.State.DELETE;
>                 this.layer.events.triggerEvent("afterfeaturemodified",
>                                                {feature: feature});
>                 feature.renderIntent = "select";
>                 this.layer.drawFeature(feature);
>             }
>         },
>         setMap: function(map) {
>             this.handler.setMap(map);
>             OpenLayers.Control.prototype.setMap.apply(this, arguments);
>         },
>         CLASS_NAME: "OpenLayers.Control.DeleteFeature"
>     });
>
>
>
>     function showMsg(szMessage) {
>         window.alert(szMessage);
>         /*document.getElementById("message").innerHTML = szMessage;
>         setTimeout(
>             "document.getElementById('message').innerHTML = ''",2000);*/
>     };
>
>     function showSuccessMsg(){
>         showMsg("Transaction successfully completed");
>     };
>
>     function showFailureMsg(){
>         showMsg("An error occured while operating the transaction");
>     };
>
>
>     function init() {
>          map = new OpenLayers.Map('basicMap', {
>             projection: new OpenLayers.Projection("EPSG:27582"),
>             units: "m",
>             maxResolution: "auto",
>             maxExtent: new
>     OpenLayers.Bounds(5000,1620000,1198000,2678000),
>             controls: [
>                 new OpenLayers.Control.PanZoom()
>             ]
>             });
>         var base = new OpenLayers.Layer.WMS("OpenLayers WMS",
>     "http://www.geosignal.org/cgi-bin/wmsmap?"
>     <http://www.geosignal.org/cgi-bin/wmsmap?>,
>             {layers: "Regions,Departements",
>          projection:"EPSG:27582",
>         displayProjection: new OpenLayers.Projection("EPSG:27582"),
>              units: "m",
>          maxResolution: "auto",
>          maxExtent: new OpenLayers.Bounds(5000,1620000,1198000,2678000),
>          sld:
>     "http://www.tinyows.org/tracdocs/demo/OpenLayers-2.9/examples/sld.xml"
>     <http://www.tinyows.org/tracdocs/demo/OpenLayers-2.9/examples/sld.xml>
>         }
>         );
>
>         map.addLayer(base);
>
>         var saveStrategy = new OpenLayers.Strategy.Save();
>         saveStrategy.events.register("success", '', showSuccessMsg);
>         saveStrategy.events.register("fail", '', showFailureMsg);
>
>        wfs = new OpenLayers.Layer.Vector("Editable Features", {
>             strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
>             projection: new OpenLayers.Projection("EPSG:27582"),
>             protocol: new OpenLayers.Protocol.WFS({
>                 version: "1.1.0",
>                 srsName: "EPSG:27582",
>                 url: "http://www.agpstracking.com/cgi-bin/tinyows?"
>     <http://www.agpstracking.com/cgi-bin/tinyows?>,
>                 featureType: "france",
>                 featureNS: "http://www.agpstracking.com/"
>     <http://www.agpstracking.com/>,
>                 geometryName: "the_geom",
>                 schema:
>     "http://www.agpstracking.com/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=france"
>     <http://www.agpstracking.com/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=france>,
>                 outputFormat: "application/json",
>                 readFormat: new OpenLayers.Format.GeoJSON()
>             })
>         });
>
>        map.addLayer(wfs);
>
>         var panel = new OpenLayers.Control.Panel(
>             {'displayClass': 'customEditingToolbar'}
>         );
>
>         var navigate = new OpenLayers.Control.Navigation({
>             title: "Pan Map"
>         });
>
>         var draw = new OpenLayers.Control.DrawFeature(
>             wfs, OpenLayers.Handler.Polygon,
>             {
>                 title: "Draw Feature",
>                 displayClass: "olControlDrawFeaturePolygon",
>                 multi: true
>             }
>         );
>
>         var edit = new OpenLayers.Control.ModifyFeature(wfs, {
>             title: "Modify Feature",
>             displayClass: "olControlModifyFeature"
>         });
>
>         var del = new DeleteFeature(wfs, {title: "Delete Feature"});
>
>         var save = new OpenLayers.Control.Button({
>             title: "Save Changes",
>             trigger: function() {
>                 if(edit.feature) {
>                     edit.selectControl.unselectAll();
>                 }
>                 saveStrategy.save();
>             },
>             displayClass: "olControlSaveFeatures"
>         });
>
>         panel.addControls([navigate, save, edit, draw, del]);
>         panel.defaultControl = navigate;
>         map.addControl(panel);
>         map.zoomToMaxExtent();
>
>     }
>
>
>     *this is my html file:*
>
>     <html>
>     <head>
>     <LINK REL=StyleSheet HREF='../estilo.css' TYPE='text/css'>
>     <link rel="stylesheet" href="theme/default/style.css"
>     type="text/css" />
>     <script src="OpenLayers-2.9/OpenLayers.js"></script>
>     <script src="tinyows_wfs-t.js"></script>
>     </head>
>
>     <body onload="init()">
>     <h1 id="title">WFS Transaction Example, (TinyOWS ans OpenLayers)</h1>
>     <div id="tags"></div>
>     <p id="shortdesc">
>                 Shows the use of the WFS Transactions (WFS-T).
>             Parks of Osnabruck (Frida).
>     <br />
>             Base layers is OpenStreetMap from Omniscale WMS Server.
>     </p>
>     <div id="basicMap"></div>
>
>     <div id="message"></div>
>     <div id="docs">
>     <p>
>                     The WFS protocol allows for creation of new
>     features and
>                     reading, updating, or deleting of existing features.
>     </p>
>     <p>
>                     Use the tools to create, modify, and delete (in
>     order from left
>                     to right) features. Use the save tool (picture of
>     a disk) to
>                     save your changes. Use the navigation tool (hand)
>     to stop
>                     editing and use the mouse for map navigation.
>     </p>
>     <p>
>                     See the <a href="tinyows_wfs-t.js" target="_blank">
>
>                     wfs-protocol-transactions.js source</a> to see how
>     this is done.
>     </p>
>     </div>
>     </body>
>     </html>
>
>     THANKS
>
>     _______________________________________________
>     TinyOWS-users mailing list
>     TinyOWS-users at lists.maptools.org
>     <mailto:TinyOWS-users at lists.maptools.org>
>     http://lists.maptools.org/mailman/listinfo/tinyows-users
>
>
>
>
> -- 
> Gissur Þórhallsson
>
> Loftmyndir ehf.
> Laugavegur 13
> IS 101 Reykjavík - Iceland
> sími (tel): (+354) 540 2500
> tölvupóstur (email): gissur at loftmyndir.is <mailto:gissur at loftmyndir.is>
>
>
> _______________________________________________
> TinyOWS-users mailing list
> TinyOWS-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tinyows-users
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-users/attachments/20111103/2778a456/attachment-0001.htm 


More information about the TinyOWS-users mailing list