OGC WMS WFS getCapabalities XML from api

470
1
03-10-2023 07:06 AM
Labels (1)
NicolasRojas
New Contributor III

I am trying to modify various XML files corresponding to an OGC service capability such as WFS or WMS.

My script publishes an SD file onto a non federated server that I connect to using the Server class from arcgis.gis.server.

My goal is to manipulate various XML versions with python from within my script but I can't get them.

The ArcGIS server doc (https://enterprise.arcgis.com/en/server/latest/publish-services/windows/available-wms-service-proper...  ===> Create external capabilities files) discribes the workflow I'm trying to implement in python.

Q1: Is there a way to retrieve the XML from the service class?

Q2: If not, how would I go about getting the XML with python?

My issue is the get request to the capability: 

https://gisserver.domain.com:6443/arcgis/services/folder/service/service_ type/WMSServer/ ?service=wms&request=GetCapabilities&version=1.0.0

returns an error because I'm missing headers in the request.

Any tips are highly appreciated!

 

-N
0 Kudos
1 Reply
NicolasRojas
New Contributor III

Found a solution with requests without giving any headers or token in GIS.exchange. here is the link:

https://gis.stackexchange.com/questions/123630/xml-elementtree-in-arcpy-consuming-wmts-xml

 

-N
0 Kudos