[TinyOWS-dev] error when saving features

Mohammed Rashad mohammedrashadkm at gmail.com
Wed Nov 3 11:04:07 EST 2010


<?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='Transaction'>
<ows:ExceptionText>Operation parameter must be set</ows:ExceptionText>
</ows:Exception></ows:ExceptionReport>

I am using world data comes with tinyows demo

my source code


  var osm = new OpenLayers.Layer.WMS(
                "OpenLayers WMS",
                "http://labs.metacarta.com/wms/vmap0",
                {layers: 'basic'}
            );
    var saveStrategy = new OpenLayers.Strategy.Save();
    saveStrategy.events.register("success", '', showSuccessMsg);
    saveStrategy.events.register("failure", '', showFailureMsg);

    wfs = new OpenLayers.Layer.Vector("Editable Features", {
        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
        projection: new OpenLayers.Projection("EPSG:4326"),
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.1.0",
            srsName: "EPSG:4326",
            url: "http://localhost/cgi-bin/tinyows",
            featureNS :  "http://www.tinyows.org/",
            featureType: "world",
            geometryName: "the_geom",
            schema: "
http://localhost/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=tows:world
"
        })
    });


          var sf = new OpenLayers.Control.SelectFeature(wfs, {callbacks:
{'click':feature_info}});
            map.addControl(sf);
            sf.activate();
    map.addLayers([osm, 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, del, edit, draw]);
    panel.defaultControl = navigate;
    map.addControl(panel);
    map.zoomToMaxExtent();

-- 
Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-dev/attachments/20101103/8f52b994/attachment.htm 


More information about the TinyOWS-dev mailing list