Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using WMS in LAN needs internet access #427

Open
ricfos opened this issue Oct 6, 2020 · 4 comments
Open

Using WMS in LAN needs internet access #427

ricfos opened this issue Oct 6, 2020 · 4 comments

Comments

@ricfos
Copy link

ricfos commented Oct 6, 2020

It's not possibile to add a WMS layer from WMS server (Mapserver 7.0.4) in the LAN if uDig 2.0.0 or 1.5.0.RC1 runs on a machine without internet access and the answer of a GetCapabilities request contains in attribute "schemaLocation" URLs of "standard" schemas like this:

<WMS_Capabilities version="1.3.0" xmlns="http://www.opengis.net/wms" xmlns:sld="http://www.opengis.net/sld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd">

There is no problem if I access this WMS with uDig 1.4.0 from the same machine. But for uDig 2.0.0 and 1.5.0.RC1 after entering the WMS URL in the "Add layer" dialog and pushing the "Next" button exceptions appear in the .metadata/.log file, see this attachment
udig-2.0.0-wms-problem.log

The WMS server URL then appears as a new entry in the catalog view but if I click this entry the first line of the IOException is written in red in the status bar stating that there is no connection to the WMS.

@ricfos
Copy link
Author

ricfos commented Oct 6, 2020

I tried to connect to the local WMS server with uDig 2.1.0.RC1 and 2.2.0.RC1 with the following result:

After I entered the URL to the WMS in the "Add data" dialog I pressed the "Next" button. This time no exception in the .log and the resources delivered by GetCapabilities (service name, all layer names) are shown in the dialog as usual, see attached screenshot wms_add_data-2 1 0 -RC1.
(However there's another problem: after choosing a resource from the list, the layer is added to the map but it is not rendered. Looks like I should report this a new issue).

Fact: uDig 2.1.0.RC1 and uDig 2.2.0.RC2 can both successfully process the response of the GetCapabilitiesRequest without accessing the internet to download the XSDs!

@ricfos
Copy link
Author

ricfos commented Oct 6, 2020

According to the GeoTools architectural overview (see chapter "Extension/XML") GeoTools are shipped with JARs (gt-xsd-*.jar, net.opengis.*.jar) containing lots of XSD files needed for WFS, WMS, GML etc. so they need not to be downloaded during parsing (e.g.of a WMS GetCapabilities response). In order to achieve this one has to ship its GeoTools-based application with these JARs. Note: seems like the GeoTools developers implemented this feature as sketched in their XML FAQ.

Just a guess:

  1. Is a possible cause of this issue that in uDig 1.5.0.RC1 and 2.0.0 one of these JARs (gt-xsd-*.jar, net.opengis.*.jar) is not included?
  2. Or is there possibly a bug in the GeoTools versions used in uDig 1.5.0.RC1 and 2.0.0 that causes this issue?

@ricfos
Copy link
Author

ricfos commented Oct 20, 2020

The problem only arises with WMS 1.3.0!

If I add "&VERSION=1.1.1" to the URL of the WMS then the GetCapabilities request returns an XML document that uses DTD instead of XML Schema for validation. Parsing and valdiating the answer to a WMS 1.1.1 GetCapabilities request does not need internet access. Hence the WMS layers are listed in uDigs "Add data" wizard and are rendered without problems after being added to a map.

@fgdrf
Copy link
Contributor

fgdrf commented Aug 27, 2021

@ricfos looks like found a workaround. Nevertheless I’m going to check the difference of Geotools Libraries in udig.libs bundle between mentioned versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants