Is there a way to fetch an XML file (a catalog or a WMS getCapacities response) ?
I have started a prototype notebook with a Leaflet map that displays a WMS layer
distributed from a TDS (Thredds Data Server).
Have a look to: WMS GCA / Patrick Brockmann / Observable
Now, I would like to fill an inputs radio with the results from a request on what are the different layers queryable (available as an XML response from the TDS).
It demands https but its certificate is expired or invalid or something, so even if you get around CORS you get a security error. I’m not sure how to get around this!
Could you download the XML file and upload it to the notebook as a file attachment? That might be unsatisfying, sorry. But once you get past that, here’s how you can use an XML file to fill a list of radio buttons:
Hi,
Many thanks in you interest in the question.
I have just investigated the XML reading.
The response from my server should work. Accept the certificat
that I have declared by myself. If it is not working, I will rebuild a prototype
by using a demo TDS from Unidata. The Observable notebook might interest them
in addition to people from Reading that have developped ncWMS2.
So for now, the different queryable layers cannot be found. Perhaps a limitation
of xmlToJSON.
looks like that xml is failing to parse correctly because it has ampersands in URLs. i escaped the ampersands (just find an replace all to &) and it now seems to work – i can get the expected array:
By the way, for https://www.globalcarbonatlas.org:8443 you may want to switch to Let’s Encrypt instead of using a self-signed certificate. Their system packages have various options for auto renewal.