Opened 9 months ago

Closed 8 months ago

Last modified 8 months 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:


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.

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 Changed 9 months ago by stoecker

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 Changed 9 months ago by stoecker

Component: CoreCore imagery

comment:3 Changed 9 months ago by Polarbear-j

No. Originally I was adding naked URLs w/o parametes in "Enter GetCapabilities URL", like

Trying gets a URL generated with 1.1.1, while the query does not show in the log.
Trying 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:/

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:/
Last edited 9 months ago by Polarbear-j (previous) (diff)

comment:4 Changed 8 months ago by simon04

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 Changed 8 months ago by simon04

Milestone: 20.05

comment:6 Changed 8 months ago by simon04

In 16424/josm:

see #19193 - Fix WMSEndpointTileSourceTest

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.