0

So I'm new to GIS and I'm missing some of the basic concepts in this field, what I need to do is to write a POST method to add or delete or update some map services I'm working on an ArcGIS server, I can modify the URL to use a GET method, put I have no idea how and where to write a POST method to modify the services.

The URL I keep on modifying is something like this:

https://someserver.domain.com/webserver/services/FAT_Testing/demokmz03/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&typeName=Buildings&BBOX=0,0,100,100&

This works just fine, I also learned all these things from this site: https://enterprise.arcgis.com/en/server/latest/publish-services/linux/communicating-with-a-wfs-service-in-a-web-browser.htm

  • 1
    Welcome to GIS SE. As a new user, please take the Tour. Unfortunately, I think you are mistaking the purpose of most POST requests to ArcGIS Server services. Just because a service supports a POST doesn't mean it accepts edit operations. It might just be exploiting the ability of POST requests to hide the full content within an HTTPS wrapper or to accept longer inputs than a simple GET. This is effectively two questions, one of which (how to do a POST) is better asked at Stack Overflow (after adequate research). At that point you'll need to research WFS editing requests supported by ArcGIS separately. – Vince Mar 5 '18 at 15:26
1

The first step is to find out whether the service supports POST requests by reading the GetCapabilities response.

https://someserver.domain.com/webserver/services/FAT_Testing/demokmz03/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetCapabilities&

Which should give you an XML response that tells you (inter al):

<ows:Operation name="GetFeature">
    <ows:DCP>
        <ows:HTTP>
            ...
            <ows:Post xlink:href="https://someserver/some/path?"/>
        </ows:HTTP>
    </ows:DCP>
</ows:Operation>

Then you can read the appropriate WFS schema (for simple feature WFS version 1.1.0) to issue a GetFeature request like:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature xmlns:ows="http://www.opengis.net/ows"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:gml="http://www.opengis.net/gml"
 xmlns:ogc="http://www.opengis.net/ogc"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:sch="http://www.ascc.net/xml/schematron"
 xmlns:smil20="http://www.w3.org/2001/SMIL20/"
 xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language"
 xmlns:wfs="http://www.opengis.net/wfs"
 xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
    <wfs:Query typeName="qName">
    </wfs:Query>
    <wfs:Query typeName="qName">
    </wfs:Query>
</wfs:GetFeature>

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.