[Users] setting content-type on WFS-T (WFSTFeatureEditingManager.js)

Marc-André Trottier marcandre_trottier at hotmail.com
Wed Sep 7 21:11:57 CEST 2011


Hi!
I'm using WFSTFeatureEditing.js with Tinyows and i got some problem on
transaction.

with this XML :
"<wfs:Transaction xmlns:wfs=\"http://www.opengis.net/wfs\" service=\"WFS\"
version=\"1.0.0\" xsi:schemaLocation=\"http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd\" xmlns:xsi=\"
http://www.w3.org/2001/XMLSchema-instance\">"+
"<wfs:Insert>"+
"<feature:CASERNE_VIEW_MODIF xmlns:feature=\"http://balblabla.qc.ca/\">"+
"<feature:geom_p>"+
"<gml:Point xmlns:gml=\"http://www.opengis.net/gml\"
srsName=\"EPSG:900913\">"+
"<gml:coordinates decimal=\".\" cs=\",\" ts=\"
\">-8026012.4235639,5923239.9348854</gml:coordinates>"+
"</gml:Point>"+
"</feature:geom_p>"+
"<feature:nom_muncp>fff</feature:nom_muncp>"+
"<feature:role>test_marc</feature:role>"+
"<feature:nom_rue>ééé</feature:nom_rue>"+
"</feature:CASERNE_VIEW_MODIF>"+
"</wfs:Insert>"+
"</wfs:Transaction>"

everything is OK when Content-type = text/xml but when
Content-type=application/xml nothing works.
so i tried to set the content-type.
i set my manager like this :

    manager = new GeoExt.ux.WFSTFeatureEditingManager({
        "map": oMap,
        "toolbar": oToolbar,
        "url": tinyURL,
        "toggleGroup": "map",
        "actionGroup": "map",
        "mainPanelContainer": WFSextWindow,
        "ignoredAttributes": {name:["the_geom", "geom_p", "geom_s",
"geom_l", "ogc_fid"]},
        "geomProperty": {name:["geom_p","geom_s","geom_l", "the_geom"]},
        "DEFAULT_PROTOCOL_OPTIONS": {featureNS: Host.obtenir(), srsName:
"EPSG:900913",  headers: {
        "CONTENT-TYPE": "text/xml"}},
        "featureEditorGridContainerOptions": {"width": 400}
    });

the GetFeature is OK (content-type=text/xml) but any transactions (INSERT,
UPDATE) had content-type=application/xml

transaction use Openlayers.Strategy.Save() so i can't see how to set the
headers of the request

Marc-andré Trottier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110907/378b582f/attachment.htm 


More information about the Users mailing list