Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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 stoecker, 5 years ago

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?

comment:2 by stoecker, 5 years ago

Component: CoreCore imagery

comment:3 by Polarbear-j, 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
Last edited 5 years ago by Polarbear-j (previous) (diff)

comment:4 by simon04, 5 years ago

Resolution: fixed
Status: newclosed

In 16412/josm:

fix #19193 - WMSImagery: fix parsing of version 1.3.0 capabilities

For the constant CAPABILITIES_ROOT_130, the namespaceURI and localPart were interchanged.

comment:5 by simon04, 5 years ago

Milestone: 20.05

comment:6 by simon04, 5 years ago

In 16424/josm:

see #19193 - Fix WMSEndpointTileSourceTest

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.