0

I am trying to insert a Layer with WFS-T and getting an error. I am using ol3 and want to insert data to my database using WFS-t so this is the GML I defined to do so :

formatGML = new ol.format.GML({
    featureNS: 
    'http://localhost:8080/geoserver/wfs/workplace',
    featureType:'layername',
    srsName: 'EPSG:3857'
    });

but unfortunately it doesn't work! It is saying :

No such feature type http://localhost:8080/geoserver/wfs/workplace:layername
  • please add the actual XML sent to the server – Ian Turton Apr 4 '17 at 14:28
  • do you have a workspace called workplace and does it include a layer called layername? or do you need to use actual layernames – Ian Turton Apr 4 '17 at 14:29
  • yes i do , actually the error was that in the GML i should provide only the workplace without the url , Thanks a lot for your willingness to help – Abdelaziz Apr 4 '17 at 14:46
  • oh , great , thank you such @Abdelaziz . It look 2 days to reach here. I will post an answer as the comment section will always gets unnoticed – AhammadaliPK Apr 5 '18 at 9:54
2

The problems is , we don't want to give url of feature namespace to featureNS, instead , we have to give only name space(workspace name).

formatGML = new ol.format.GML({
    featureNS: 'your_workspace',
    featureType:'layername',
    srsName: 'EPSG:3857'
    });

But while updating , you can give both full url to featureNS or workspace name only and it will work .Honestly,that looks weird.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.