aims-ks / atlasmapper

Automatically exported from code.google.com/p/atlasmapper
2 stars 0 forks source link

Client build fails with poor error message when data source URL is missing "http://" #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a WMS data source that is missing the "http://" at the start of its 
URL. For example "maps.e-atlas.org.au/maps/wms" instead of the correct 
"http://maps.e-atlas.org.au/maps/wms".
2. Include the data source in a client and try to build it.

What is the expected output? What do you see instead?
The AtlasMapper should be tolerant of different ways of entering a URL 
including missing the "http://" at the start, or it should give an informative 
error message, close to where the error occurred.

Instead when the client is built it fails with the following error message:

 An error occurred while generating the client configuration.
 Can not retrieved all Capabilities Documents. Generation aborted.
 Could not parse 1 capabilities document(s):
 - e-AtlasNew [j.e-atlas.org.au/maps/wms]: null

What version of the product are you using? On what operating system?
AtlasMapper 1.3, Ubuntu 8.04 LTS

Please provide any additional information below.

Original issue reported on code.google.com by eric.law...@gmail.com on 24 Apr 2013 at 8:04

GoogleCodeExporter commented 9 years ago
The whole logic of generation has been split; the download / parsing of data 
sources has been moved in the data source interface. This give error message at 
lease:

Error: Can not parse the URL: maps.e-atlas.org.au/maps/wms?SERVICE=WMS&REQ...

Before closing this issue, I still want to add the logic to add the protocol 
(http) when it is missing.

Original comment by lafond.g...@gmail.com on 28 May 2013 at 9:42

GoogleCodeExporter commented 9 years ago
Fixed in 1.4 by using Utils.toURL(String)

All URL, give by the User, found in a capabilities document or other, are 
parsed using Utils.toURL(String) that return a URL. That function, amount other 
things, add "http" as protocol when the protocol is missing.

Original comment by lafond.g...@gmail.com on 12 Jul 2013 at 4:29