Re: [JPP-Devel] WMS test (fails)

2020-01-14 Thread Rahkonen Jukka (MML)
Hi,

You seem to talk with a bit exceptional server and that's good for debugging. I 
believe that your server 1) is using a not-well know certificate authority and 
2) is configured to deliver GetCapabilities without username/password.

Our server is using well known certificate and requires credentials already for 
GetCapabilities which is more usual as far as I know. In this case OJ is 
sending that WMS exception immediately.

It would be more user friendly to show just the http 401 error code with 
explanation but I guess that Ede has made a generic system that shows any 
exception that the server sends back as it comes. Our server seems to use 
different description for the 401 error

Response code: 401
Headers:
{null=[HTTP/1.0 401 Unauthorized], Server=[BigIP], WWW-Authenticate=[Basic 
realm="MML"], Connection=[close], Content-Length=[12]}
Response body:
Unauthorized
  
Headers may tell something interesting if there happens some other error than 
401 so I think it is OK to show the long message to users even it is somewhat 
ugly.

-Jukka-

-Alkuperäinen viesti-
Lähettäjä: Michaël Michaud  
Lähetetty: tiistai 14. tammikuuta 2020 8.50
Vastaanottaja: jump-pilot-devel@lists.sourceforge.net
Aihe: Re: [JPP-Devel] WMS test (fails)

Ede,

I tested a connexion with simple name/password authorization and I can connect 
to the service.

What is odd is that if I connect without entering user/password information
- i get the first panel saying authority is not recognized and asking if I want 
to bypass (the first time I try to connect only)
- I get the second panel showing the URL declared by the service and asking if 
I want to use it or not
     answering yes or not seems acepted and show the available layer list
     trying to load a layer throw an exception in both cases (exception 
contains the message "401 Authorization Required"
     but it is a little bit hidden in a long message that nobody will read)

Not sure if we can know anything about the authorization problem before trying 
to load a layer.
Else, we could extract the informative message ("authorization required" 
from the http response) to
give the user a more comprehensive exception.

Anyway, the problem is about user experience, the behaviour seems correct to me.

Michaël


Le 14/01/2020 à 01:23, edgar.sol...@web.de a écrit :
> thx Jukka! Could anyone test it on another WMS server using auth please? just 
> to make sure.
>
> should we also clean out the list of example services. some seem to be broken 
> by now.
>
> ..ede
>
> On 13.01.2020 20:37, Rahkonen Jukka (MML) wrote:
>> Yes, it is fixed at least for that server.
>>
>> -Jukka-
>> 
>> Lähettäjä: edgar.sol...@web.de 
>> Lähetetty: 13. tammikuuta 2020 20:06
>> Vastaanottaja: Rahkonen Jukka (MML); OpenJump develop and use
>> Aihe: Re: [JPP-Devel] WMS test (fails)
>>
>> using auth i assume?! so it's fixed?. ..ede
>>
>> On 13.01.2020 17:55, Rahkonen Jukka (MML) wrote:
>>> Tried r6221, WMS of the National Land Survey works again.
>>>
>>> -Jukka-
>>>
>>> -Alkuperäinen viesti-
>>> Lähettäjä: edgar.sol...@web.de 
>>> Lähetetty: maanantai 13. tammikuuta 2020 17.40
>>> Vastaanottaja: OpenJump develop and use 
>>> ; Rahkonen Jukka (MML) 
>>> 
>>> Aihe: Re: [JPP-Devel] WMS test (fails)
>>>
>>> Jukka,
>>>
>>> please try
>>>
>>> "
>>> Revision: 6218
>>>http://sourceforge.net/p/jump-pilot/code/6218
>>> Author:   edso
>>> Date: 2020-01-13 15:38:53 + (Mon, 13 Jan 2020)
>>> Log Message:
>>> ---
>>> move WMS auth to the utility class
>>> should fix connecting WMS using authentification after adding http redirect 
>>> support "
>>> java.lang.IllegalStateException: Already connected
>>>  at 
>>> sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(Unknown 
>>> Source)
>>>  at 
>>> sun.net.www.protocol.https.HttpsURLConnectionImpl.setRequestProperty(Unknown
>>>  Source)
>>>  at 
>>> com.vividsolutions.wms.AbstractWMSRequest.prepareConnection(AbstractWMSRequest.java:80)
>>>  at 
>>> com.vividsolutions.wms.AbstractWMSRequest.getConnection(AbstractWMSRequest.java:98)
>>>  at 
>>> com.vividsolutions.wms.AbstractWMSRequest.getInputStream(AbstractWMSRequest.java:145)
>>>  at com.vividsolutions.wms.WMService.initialize(WMService.java:141
>>>  ...
>>> "
>>>
>>> On 13.01.2020 12:47, Rahkonen Jukka (MML) wrote:
 Service URL appears in the message
 https:// sopimus-karttakuva.maanmittauslaitos.fi

 The "already connected" error appears with any not empty user name, for 
 example "foo".
 Let's see how to test if you can pass this first barrier.

 -Jukka-


 -Alkuperäinen viesti-
 Lähettäjä: edgar.sol...@web.de 
 Lähetetty: maanantai 13. tammikuuta 2020 13.36
 Vastaanottaja: jump-pilot-devel@lists.sourceforge.net
 Aihe: Re: [JPP-Devel] WMS test (fails)

 Jukka,

 can you send me a service url to

Re: [JPP-Devel] WMS test (fails)

2020-01-14 Thread Michaud Michael


Hi Jukka,Thanks for your analyze.Unfortunately, the server I'm talking with is not so exceptional (indeed, i think it is the main one in France as it is set by our national mapping agency). But they recently changed the certificate and the new one is no more recognized by the OracleJDK (it is recognized by java coretto distribution though).I have no idea about why the getCapability is accessible without authentification and the getMap is not. Maybe it is unusual. As it is a big system with many ways to grant access to different kind of people, there maybe some reason...Anyway, I understand more clearly what happens now, and suggest to follow your advice and to not change anything.Michaëlenvoyé : 14 janvier 2020 à 09:10de : "Rahkonen Jukka (MML)" à : OpenJump develop and use objet : Re: [JPP-Devel] WMS test (fails)Hi,You seem to talk with a bit exceptional server and that's good for debugging. I believe that your server 1) is using a not-well know certificate authority and 2) is configured to deliver GetCapabilities without username/password.Our server is using well known certificate and requires credentials already for GetCapabilities which is more usual as far as I know. In this case OJ is sending that WMS exception immediately.It would be more user friendly to show just the http 401 error code with explanation but I guess that Ede has made a generic system that shows any exception that the server sends back as it comes. Our server seems to use different description for the 401 errorResponse code: 401Headers:{null=[HTTP/1.0 401 Unauthorized], Server=[BigIP], WWW-Authenticate=[Basic realm="MML"], Connection=[close], Content-Length=[12]}Response body:Unauthorized Headers may tell something interesting if there happens some other error than 401 so I think it is OK to show the long message to users even it is somewhat ugly.-Jukka--Alkuperäinen viesti-Lähettäjä: Michaël Michaud  Lähetetty: tiistai 14. tammikuuta 2020 8.50Vastaanottaja: jump-pilot-devel@lists.sourceforge.netAihe: Re: [JPP-Devel] WMS test (fails)Ede,I tested a connexion with simple name/password authorization and I can connect to the service.What is odd is that if I connect without entering user/password information- i get the first panel saying authority is not recognized and asking if I want to bypass (the first time I try to connect only)- I get the second panel showing the URL declared by the service and asking if I want to use it or not     answering yes or not seems acepted and show the available layer list     trying to load a layer throw an exception in both cases (exception contains the message "401 Authorization Required"     but it is a little bit hidden in a long message that nobody will read)Not sure if we can know anything about the authorization problem before trying to load a layer.Else, we could extract the informative message ("authorization required" from the http response) togive the user a more comprehensive exception.Anyway, the problem is about user experience, the behaviour seems correct to me.MichaëlLe 14/01/2020 à 01:23, edgar.sol...@web.de a écrit :thx Jukka! Could anyone test it on another WMS server using auth please? just to make sure.should we also clean out the list of example services. some seem to be broken by now...edeOn 13.01.2020 20:37, Rahkonen Jukka (MML) wrote:>> Yes, it is fixed at least for that server. -Jukka->> >> Lähettäjä: edgar.sol...@web.de >> Lähetetty: 13. tammikuuta 2020 20:06>> Vastaanottaja: Rahkonen Jukka (MML); OpenJump develop and use>> Aihe: Re: [JPP-Devel] WMS test (fails) using auth i assume?! so it's fixed?. ..ede On 13.01.2020 17:55, Rahkonen Jukka (MML) wrote:>>> Tried r6221, WMS of the National Land Survey works again.>> -Jukka->> -Alkuperäinen viesti->>> Lähettäjä: edgar.sol...@web.de >>> Lähetetty: maanantai 13. tammikuuta 2020 17.40>>> Vastaanottaja: OpenJump develop and use >>> ; Rahkonen Jukka (MML) >>> >>> Aihe: Re: [JPP-Devel] WMS test (fails)>> Jukka,>> please try>> ">>> Revision: 6218>>> http://sourceforge.net/p/jump-pilot/code/6218>>> Author: edso>>> Date: 2020-01-13 15:38:53 + (Mon, 13 Jan 2020)>>> Log Message:>>> --->>> move WMS auth to the utility class>>> should fix connecting WMS using authentification after adding http redirect support ">>> java.lang.IllegalStateException: Already connected>>> at sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(Unknown Source)>>> at sun.net.www.protocol.https.HttpsURLConnectionImpl.setRequestProperty(Unknown Source)>>> at com.vividsolutions.wms.AbstractWMSRequest.prepareConnection(AbstractWMSRequest.java:80)>>> at com.vividsolutions.wms.AbstractWMSRequest.getConnection(AbstractWMSRequest.java:98)>>> at com.vividsolutions.wms.AbstractWMSRequest.getInputStream(AbstractWMSRequest.java:145)>>> at com.vividsolutions.wms.WMService.initialize(WMService.java:141>>> ...>>> ">> On 13.01.2020 12:47, Rahkonen Jukka (MML) wrote:>

Re: [JPP-Devel] WMS test (fails)

2020-01-14 Thread Rahkonen Jukka (MML)
Hi,

I take some of my words back. Not trusted certificates are not rare and because 
of automatic harvesting of Inspire metadata even secured services are 
recommended to keep GetCapabilities open if they serve Inspire data.

Users can add certificates into Java keystore with keytool but it is 
complicated.

-Jukka-

Lähettäjä: Michaud Michael 
Lähetetty: tiistai 14. tammikuuta 2020 13.20
Vastaanottaja: OpenJump develop and use 
; Rahkonen Jukka (MML) 

Aihe: Re: [JPP-Devel] WMS test (fails)


Hi Jukka,

Thanks for your analyze.

Unfortunately, the server I'm talking with is not so exceptional (indeed, i 
think it is the main one in France as it is set by our national mapping 
agency). But they recently changed the certificate and the new one is no more 
recognized by the OracleJDK (it is recognized by java coretto distribution 
though).

I have no idea about why the getCapability is accessible without 
authentification and the getMap is not. Maybe it is unusual. As it is a big 
system with many ways to grant access to different kind of people, there maybe 
some reason...

Anyway, I understand more clearly what happens now, and suggest to follow your 
advice and to not change anything.

Michaël

envoyé : 14 janvier 2020 à 09:10
de : "Rahkonen Jukka (MML)" 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
à : OpenJump develop and use 
mailto:jump-pilot-devel@lists.sourceforge.net>>
objet : Re: [JPP-Devel] WMS test (fails)


Hi,

You seem to talk with a bit exceptional server and that's good for debugging. I 
believe that your server 1) is using a not-well know certificate authority and 
2) is configured to deliver GetCapabilities without username/password.

Our server is using well known certificate and requires credentials already for 
GetCapabilities which is more usual as far as I know. In this case OJ is 
sending that WMS exception immediately.

It would be more user friendly to show just the http 401 error code with 
explanation but I guess that Ede has made a generic system that shows any 
exception that the server sends back as it comes. Our server seems to use 
different description for the 401 error

Response code: 401
Headers:
{null=[HTTP/1.0 401 Unauthorized], Server=[BigIP], WWW-Authenticate=[Basic 
realm="MML"], Connection=[close], Content-Length=[12]}
Response body:
Unauthorized

Headers may tell something interesting if there happens some other error than 
401 so I think it is OK to show the long message to users even it is somewhat 
ugly.

-Jukka-

-Alkuperäinen viesti-
Lähettäjä: Michaël Michaud 
mailto:m.michael.mich...@orange.fr>>
Lähetetty: tiistai 14. tammikuuta 2020 8.50
Vastaanottaja: 
jump-pilot-devel@lists.sourceforge.net
Aihe: Re: [JPP-Devel] WMS test (fails)

Ede,

I tested a connexion with simple name/password authorization and I can connect 
to the service.

What is odd is that if I connect without entering user/password information
- i get the first panel saying authority is not recognized and asking if I want 
to bypass (the first time I try to connect only)
- I get the second panel showing the URL declared by the service and asking if 
I want to use it or not
answering yes or not seems acepted and show the available layer list
trying to load a layer throw an exception in both cases (exception contains 
the message "401 Authorization Required"
but it is a little bit hidden in a long message that nobody will read)

Not sure if we can know anything about the authorization problem before trying 
to load a layer.
Else, we could extract the informative message ("authorization required"
from the http response) to
give the user a more comprehensive exception.

Anyway, the problem is about user experience, the behaviour seems correct to me.

Michaël


Le 14/01/2020 à 01:23, edgar.sol...@web.de a écrit :

thx Jukka! Could anyone test it on another WMS server using auth please? just 
to make sure.

should we also clean out the list of example services. some seem to be broken 
by now.

..ede

On 13.01.2020 20:37, Rahkonen Jukka (MML) wrote:

>> Yes, it is fixed at least for that server.>>
>> -Jukka-
>> 
>> Lähettäjä: edgar.sol...@web.de 
>> mailto:edgar.sol...@web.de>>
>> Lähetetty: 13. tammikuuta 2020 20:06
>> Vastaanottaja: Rahkonen Jukka (MML); OpenJump develop and use
>> Aihe: Re: [JPP-Devel] WMS test (fails)
>>
>> using auth i assume?! so it's fixed?. ..ede
>>
>> On 13.01.2020 17:55, Rahkonen Jukka (MML) wrote:
>>> Tried r6221, WMS of the National Land Survey works again.
>>>
>>> -Jukka-
>>>
>>> -Alkuperäinen viesti-
>>> Lähettäjä: edgar.sol...@web.de 
>>> mailto:edgar.sol...@web.de>>
>>> Lähetetty: maanantai 13. tammikuuta 2020 17.40
>>> Vastaanottaja: OpenJump develop and use
>>> mailto:jump-pilot-devel@lists.sourceforge.net>>;
>>>  Rahkonen Jukka (MML)
>>> mailto:jukka.rahko...@maanmitta

[JPP-Devel] SVN: [6223] core/trunk

2020-01-14 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6223
  http://sourceforge.net/p/jump-pilot/code/6223
Author:   michaudm
Date: 2020-01-14 16:36:38 + (Tue, 14 Jan 2020)
Log Message:
---
Better management of WMS GetCapabilities with empty title tag

Modified Paths:
--
core/trunk/ChangeLog
core/trunk/src/com/vividsolutions/wms/AbstractParser.java
core/trunk/src/language/jump.properties
core/trunk/src/language/jump_de.properties
core/trunk/src/language/jump_es.properties
core/trunk/src/language/jump_fi.properties
core/trunk/src/language/jump_fr.properties
core/trunk/src/language/jump_hu.properties
core/trunk/src/language/jump_it.properties
core/trunk/src/language/jump_ja_JP.properties
core/trunk/src/language/jump_ml.properties
core/trunk/src/language/jump_pt.properties
core/trunk/src/language/jump_pt_BR.properties
core/trunk/src/language/jump_ta_IN.properties
core/trunk/src/language/jump_te.properties
core/trunk/src/language/jump_zh_CN.properties
core/trunk/src/language/jump_zh_HK.properties

Modified: core/trunk/ChangeLog
===
--- core/trunk/ChangeLog2020-01-13 20:36:59 UTC (rev 6222)
+++ core/trunk/ChangeLog2020-01-14 16:36:38 UTC (rev 6223)
@@ -3,6 +3,10 @@
 # 2. make sure that lines break at 80 chars for constricted display situations
 #< 80 chars 
-->#
 
+2020-01-14 mmichaud 
+  * Display a message instead of throwing an exception if a WMS
+GetCapabilies has an empty tag WMT_MS_Capabilies/Service/Title
+
 2020-01-08 mmichaud 
   * fix a bug related to WMS GetCapability reading (used
 platform encoding instead of encoding declared in xml)

Modified: core/trunk/src/com/vividsolutions/wms/AbstractParser.java
===
--- core/trunk/src/com/vividsolutions/wms/AbstractParser.java   2020-01-13 
20:36:59 UTC (rev 6222)
+++ core/trunk/src/com/vividsolutions/wms/AbstractParser.java   2020-01-14 
16:36:38 UTC (rev 6223)
@@ -59,7 +59,11 @@
 import com.vividsolutions.jump.workbench.Logger;
 import com.vividsolutions.wms.util.XMLTools;
 
+import javax.swing.*;
 
+import static javax.swing.JOptionPane.showMessageDialog;
+
+
 /**
  * Pulls WMS objects out of the XML
  * @author Chris Hodgson chodg...@refractions.net
@@ -125,14 +129,17 @@
 }
 
 protected String getTitle(Document doc) throws IOException {
-String title;
+String title = "Untitled";
 try {
 title = ((CharacterData)XMLTools.simpleXPath(doc, 
getTitlePath()).getFirstChild()).getData();
-} catch (Exception e) {
+} catch (NullPointerException e) {
 // possible NullPointerException if there is no firstChild()
 // also possible miscast causing an Exception
 // [uwe dalluege]
-throw new IOException( "Element <" + getTitlePath() + "> not 
found, maybe a WMS version problem! " );
+showMessageDialog(null,
+
I18N.getMessage("com.vividsolutions.wms.AbstractParser.wms-parser-not-found", 
getTitlePath()),
+null, JOptionPane.INFORMATION_MESSAGE);
+//throw new IOException( "Element <" + getTitlePath() + "> not 
found, maybe a WMS version problem! " );
 }
 return title;
 }

Modified: core/trunk/src/language/jump.properties
===
--- core/trunk/src/language/jump.properties 2020-01-13 20:36:59 UTC (rev 
6222)
+++ core/trunk/src/language/jump.properties 2020-01-14 16:36:38 UTC (rev 
6223)
@@ -228,6 +228,7 @@
 com.vividsolutions.jump.workbench.ui.zoom.ZoomToFullExtentPlugIn = Zoom To 
Full Extent
 com.vividsolutions.jump.workbench.ui.zoom.ZoomToLayerPlugIn = Zoom To Layer
 com.vividsolutions.jump.workbench.ui.zoom.ZoomToSelectedItemsPlugIn = Zoom To 
Selected Items
+com.vividsolutions.wms.AbstractParser.wms-parser-not-found = Mandatory element 
<{0}> not found in the GetCapabilities,\nThere may be a WMS version problem!
 com.vividsolutions.wms.Parser.invalid-bounding-box-element-node = Invalid 
bounding box element node.
 com.vividsolutions.wms.Parser.not-a-latlon-boundingbox-element = Not a 
(Lat/Long) Bounding-Box Element
 com.vividsolutions.wms.WMService.Error = Error

Modified: core/trunk/src/language/jump_de.properties
===
--- core/trunk/src/language/jump_de.properties  2020-01-13 20:36:59 UTC (rev 
6222)
+++ core/trunk/src/language/jump_de.properties  2020-01-14 16:36:38 UTC (rev 
6223)
@@ -2903,7 +2903,7 @@
 
org.openjump.core.ui.plugin.mousemenu.SelectAllOrderedFeaturesFromAttributeTablePlugIn=#T:Select
 all ordered features
 
org.openjump.core.ui.plugin.mousemenu.SelectAllOrderedFeaturesFromAttributeTablePlugIn.selected-features=#T:objets
 s\xE9lectionn\xE9s
 org.openjump.cor

[JPP-Devel] [jump-pilot:feature-requests] #265 Create a "make line" tool

2020-01-14 Thread Jukka Rahkonen via Jump-pilot-devel



---

** [feature-requests:#265] Create a "make line" tool**

**Status:** open
**Created:** Tue Jan 14, 2020 06:00 PM UTC by Jukka Rahkonen
**Last Updated:** Tue Jan 14, 2020 06:00 PM UTC
**Owner:** nobody
**Attachments:**

- 
[OpenJUMP_makeline_definition.odt](https://sourceforge.net/p/jump-pilot/feature-requests/265/attachment/OpenJUMP_makeline_definition.odt)
 (39.3 kB; application/vnd.oasis.opendocument.text)


The new tool should build a linestring from the points from a layer. Points 
should be added as vertices to the linestring in the same order than they 
appear in data, or sorted by a selected attribute. More details in the 
attachments.


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/feature-requests/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/feature-requests/options.  Or, if 
this is a mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] [jump-pilot:feature-requests] #265 Create a "make line" tool

2020-01-14 Thread Jukka Rahkonen via Jump-pilot-devel
- Attachments has changed:

Diff:



--- old
+++ new
@@ -1 +1,2 @@
+OpenJUMP_makeline.jml.txt (2.6 kB; text/plain)
 OpenJUMP_makeline_definition.odt (39.3 kB; 
application/vnd.oasis.opendocument.text)



- **Comment**:

Test data.



---

** [feature-requests:#265] Create a "make line" tool**

**Status:** open
**Created:** Tue Jan 14, 2020 06:00 PM UTC by Jukka Rahkonen
**Last Updated:** Tue Jan 14, 2020 06:00 PM UTC
**Owner:** nobody
**Attachments:**

- 
[OpenJUMP_makeline.jml.txt](https://sourceforge.net/p/jump-pilot/feature-requests/265/attachment/OpenJUMP_makeline.jml.txt)
 (2.6 kB; text/plain)
- 
[OpenJUMP_makeline_definition.odt](https://sourceforge.net/p/jump-pilot/feature-requests/265/attachment/OpenJUMP_makeline_definition.odt)
 (39.3 kB; application/vnd.oasis.opendocument.text)


The new tool should build a linestring from the points from a layer. Points 
should be added as vertices to the linestring in the same order than they 
appear in data, or sorted by a selected attribute. More details in the 
attachments.


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/feature-requests/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/feature-requests/options.  Or, if 
this is a mailing list, you can unsubscribe from the mailing list.___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel