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 <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 <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 <edgar.sol...@web.de>
>>> Lähetetty: maanantai 13. tammikuuta 2020 17.40
>>> Vastaanottaja: OpenJump develop and use 
>>> <jump-pilot-devel@lists.sourceforge.net>; Rahkonen Jukka (MML) 
>>> <jukka.rahko...@maanmittauslaitos.fi>
>>> 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 +0000 (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 <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 test against privately?.. ede
>>>>
>>>> On 13.01.2020 12:32, Rahkonen Jukka (MML) wrote:
>>>>> Hi,
>>>>>
>>>>> OJ r6217 does not connect to our WMS server that requires https and basic 
>>>>> auth. Version OpenJUMP-20190228-r6144-PLUS connects fine. The error is:
>>>>>
>>>>> [INFO] 13:29:09.197 Using the system trust manager to verify certificate 
>>>>> for host 'sopimus-karttakuva.maanmittauslaitos.fi'.
>>>>> [ERROR] 13:29:09.412 Already connected
>>>>> 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)
>>>>>          at 
>>>>> com.vividsolutions.jump.workbench.ui.plugin.wms.URLWizardPanel.exitingToRight(URLWizardPanel.java:172)
>>>>>          at 
>>>>> com.vividsolutions.jump.workbench.ui.wizard.WizardDialog.next(WizardDialog.java:250)
>>>>>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>>>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
>>>>> Source)
>>>>>          at java.lang.reflect.Method.invoke(Unknown Source)
>>>>>          at 
>>>>> org.openjump.swing.util.InvokeMethodRunnable.run(InvokeMethodRunnable.java:68)
>>>>>          at 
>>>>> org.openjump.swing.listener.InvokeMethodActionListener.actionPerformed(InvokeMethodActionListener.java:71)
>>>>>          at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>>>>>          at javax.swing.AbstractButton$Handler.actionPerformed(Unknown 
>>>>> Source)
>>>>>          at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown 
>>>>> Source)
>>>>>          at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>>>>>          at 
>>>>> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
>>>>>          at java.awt.Component.processMouseEvent(Unknown Source)
>>>>>          at javax.swing.JComponent.processMouseEvent(Unknown Source)
>>>>>          at java.awt.Component.processEvent(Unknown Source)
>>>>>          at java.awt.Container.processEvent(Unknown Source)
>>>>>          at java.awt.Component.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Component.dispatchEvent(Unknown Source)
>>>>>          at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown 
>>>>> Source)
>>>>>          at java.awt.LightweightDispatcher.processMouseEvent(Unknown 
>>>>> Source)
>>>>>          at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>>>>>          at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Window.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Component.dispatchEvent(Unknown Source)
>>>>>          at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.EventQueue.access$500(Unknown Source)
>>>>>          at java.awt.EventQueue$3.run(Unknown Source)
>>>>>          at java.awt.EventQueue$3.run(Unknown Source)
>>>>>          at java.security.AccessController.doPrivileged(Native Method)
>>>>>          at 
>>>>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>>>>>  Source)
>>>>>          at 
>>>>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>>>>>  Source)
>>>>>          at java.awt.EventQueue$4.run(Unknown Source)
>>>>>          at java.awt.EventQueue$4.run(Unknown Source)
>>>>>          at java.security.AccessController.doPrivileged(Native Method)
>>>>>          at 
>>>>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>>>>>  Source)
>>>>>          at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>>>>          at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown 
>>>>> Source)
>>>>>          at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown 
>>>>> Source)
>>>>>          at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown 
>>>>> Source)
>>>>>          at java.awt.WaitDispatchSupport$2.run(Unknown Source)
>>>>>          at java.awt.WaitDispatchSupport$4.run(Unknown Source)
>>>>>          at java.awt.WaitDispatchSupport$4.run(Unknown Source)
>>>>>          at java.security.AccessController.doPrivileged(Native Method)
>>>>>          at java.awt.WaitDispatchSupport.enter(Unknown Source)
>>>>>          at java.awt.Dialog.show(Unknown Source)
>>>>>          at java.awt.Component.show(Unknown Source)
>>>>>          at java.awt.Component.setVisible(Unknown Source)
>>>>>          at java.awt.Window.setVisible(Unknown Source)
>>>>>          at java.awt.Dialog.setVisible(Unknown Source)
>>>>>          at 
>>>>> org.openjump.core.ui.plugin.file.OpenWizardPlugIn.execute(OpenWizardPlugIn.java:99)
>>>>>          at 
>>>>> com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(AbstractPlugIn.java:344)
>>>>>          at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>>>>>          at javax.swing.AbstractButton$Handler.actionPerformed(Unknown 
>>>>> Source)
>>>>>          at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown 
>>>>> Source)
>>>>>          at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>>>>>          at 
>>>>> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
>>>>>          at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
>>>>>          at java.awt.Component.processMouseEvent(Unknown Source)
>>>>>          at javax.swing.JComponent.processMouseEvent(Unknown Source)
>>>>>          at java.awt.Component.processEvent(Unknown Source)
>>>>>          at java.awt.Container.processEvent(Unknown Source)
>>>>>          at java.awt.Component.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Component.dispatchEvent(Unknown Source)
>>>>>          at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown 
>>>>> Source)
>>>>>          at java.awt.LightweightDispatcher.processMouseEvent(Unknown 
>>>>> Source)
>>>>>          at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>>>>>          at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Window.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.Component.dispatchEvent(Unknown Source)
>>>>>          at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
>>>>>          at java.awt.EventQueue.access$500(Unknown Source)
>>>>>          at java.awt.EventQueue$3.run(Unknown Source)
>>>>>          at java.awt.EventQueue$3.run(Unknown Source)
>>>>>          at java.security.AccessController.doPrivileged(Native Method)
>>>>>          at 
>>>>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>>>>>  Source)
>>>>>          at 
>>>>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>>>>>  Source)
>>>>>          at java.awt.EventQueue$4.run(Unknown Source)
>>>>>          at java.awt.EventQueue$4.run(Unknown Source)
>>>>>          at java.security.AccessController.doPrivileged(Native Method)
>>>>>          at 
>>>>> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
>>>>>  Source)
>>>>>          at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>>>>          at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown 
>>>>> Source)
>>>>>          at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown 
>>>>> Source)
>>>>>          at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown 
>>>>> Source)
>>>>>          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>>>          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>>>          at java.awt.EventDispatchThread.run(Unknown Source)
>>>>>
>>>>> -Jukka-
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Jump-pilot-devel mailing list
>>>>> Jump-pilot-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Jump-pilot-devel mailing list
>>>> Jump-pilot-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>
>>>>
>>>> _______________________________________________
>>>> Jump-pilot-devel mailing list
>>>> Jump-pilot-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to