#19193 closed defect (fixed)
WMS needs to consider version of the capabilities, and parse for correct parameters
Reported by: | Polarbear-j | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.05 |
Component: | Core imagery | Version: | |
Keywords: | Cc: |
Description
Identification: JOSM/1.5 (16392 en) Mac OS X 10.11.6
OS Build number: Mac OS X 10.11.6 (15G22010)
Java version: 1.8.0_231-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Trying to add a WMS layer that tells me it speaks version="1.3.0" in its WMS_Capabilities header.
https://inspire.brandenburg.de/services/gn_alkis_wms?SERVICE=WMS&REQUEST=GetCapabilities
Adding it to JOSM, it creates a 'generated WMS URL' that speaks: VERSION=1.1.1
This causes the server to grumble severly with HTTP/1.1 400, saying "[CDATA] The version "1.1.1" is none of the supported versions" (red in each tile).
Changing the URL manually from VERSION=1.1.1 -> 1.3.0 gets the server to start smiling, while still sending HTTP/1.1 400, it says that "The parameter CRS is missing or syntactically incorrect". Now, this is the projection, and changing SRS={proj} -> CRS={proj} makes the server a playful friend.
Maybe this could be parsed automatically, we also might check for further syntax differences between the versions.
Finally, I did not expect "Hundesportverein e.V." (dog sport association) a geographical name, but that's not JOSM's matter ;-)
Attachments (0)
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Component: | Core → Core imagery |
---|
comment:3 by , 5 years ago
No. Originally I was adding naked URLs w/o parametes in "Enter GetCapabilities URL", like
https://inspire.brandenburg.de/services/au_alkis_wms
Trying
https://inspire.brandenburg.de/services/au_alkis_wms?VERSION=1.3.0 gets a URL generated with 1.1.1, while the query does not show in the log.
Trying
https://inspire.brandenburg.de/services/au_alkis_wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 gets "could not retrieve WMS layer list"
because it creates a malformed query. Note the duplication of the parameters, concatenation without & and the contradicting versions:
SEVERE: java.nio.file.NoSuchFileException: https:/inspire.brandenburg.de/services/au_alkis_wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1
Adding a & at the end solves the wrong concatenation but leaves the problem of two version strings in the query:
SEVERE: java.nio.file.NoSuchFileException: https:/inspire.brandenburg.de/services/au_alkis_wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1
comment:5 by , 5 years ago
Milestone: | → 20.05 |
---|
There already is an 1.1.1/1.3.0 handling. It probably needs finetuning.
P.S. Does it work, when you add &VERSION=1.3.0 in the initial GetCapabilities request?