I'm trying to use WMSLayer (https://developers.arcgis.com/javascript/3/jsapi/wmslayer-amd.html) to create a layer from a WMS file. However, the class makes a call to https://www.geoservicos.ide.df.gov.br/arcgis/services/Publico/CADASTRO_TERRITORIAL/MapServer/WMSServer/1.0.0/WMTSCapabilities.xml and this url is returning:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException code="RequestNotAllowed">
The request not allowed.
</ServiceException>
</ServiceExceptionReport>
Doing some tests I found that there is the url https://www.geoservicos.ide.df.gov.br/arcgis/services/Publico/CADASTRO_TERRITORIAL/MapServer/WMSServer?service=WMS&request=GetCapabilities and this one does return an XML, but is not formatted the way the library needs to do the parser (it doesn't have the contents tag). Returning the following error:
The WMTS capabilities XML is not valid
Can anyone help me with this?