Same issue over here, anyone ideas how this was solved?


YJO wrote:
> 
> Hi,
> 
> I'am accessing a webservice throug a proxy (that requeries authentication)
> over SSL and I keep getting this message : javax.net.ssl.SSLException:
> Unrecognized SSL message, plaintext connection?
> 
> This is what I do ?
> 
>         System.setProperty("javax.net.ssl.keyStore", keystoreUri);
>         System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
>         System.setProperty("javax.net.ssl.keyStoreType", "JKS");
> 
>         System.setProperty( "java.protocol.handler.pkgs",
> "com.sun.net.ssl.internal.www.protocol" );
>         
>         System.setProperty("javax.net.ssl.trustStore", truststoreUri);
>         System.setProperty("javax.net.ssl.trustStorePassword",
> "changeit");
>         
>         System.setProperty("http.proxySet", "true");
>         System.setProperty("http.proxyHost", "<myhost>");
>         System.setProperty("http.proxyPort", "80");
>         System.setProperty("http.proxyUser", "<myuser>");
>         System.setProperty("http.proxyPassword", "<mypasswd>");
> 
>         System.setProperty("https.proxySet", "true");
>         System.setProperty("https.proxyHost", "<my-host>");
>         System.setProperty("https.proxyPort", "443");
>         System.setProperty("https.proxyUser", "<myuser>");
>         System.setProperty("https.proxyPassword", "<mypasswd>");
>         System.setProperty("java.net.debug", "all");
> 
> 
> Acessing the url of the webservice via the browser works fine also setting
> up a communication like here (see below) works fine. Yet the axis API
> doesn't offer me this to do(or am I wrong).
> 
>         try {
>       javax.net.ssl.HttpsURLConnection connection =
> (javax.net.ssl.HttpsURLConnection)new
> URL("https://gmail.com";).openConnection();
>               String encoded = new
> String(org.apache.commons.codec.binary.Base64.encodeBase64(new
> String("<myuser>:<mypasswd>").getBytes()));
>               connection.setRequestProperty("Proxy-Authorization", "Basic " +
> encoded);
>               
>               connection.setHostnameVerifier(new HostnameVerifier(){
>                       public boolean verify(String urlHostName, SSLSession 
> session) {
>                               return true;
>                       }
>               });
> 
>       connection.connect();
>       boolean b = connection.usingProxy();
>       BufferedInputStream i = new
> BufferedInputStream(connection.getInputStream());
>       StringBuffer sb = new StringBuffer();
>             int c = 0;
>             while ((c = i.read()) != -1) {
>                 sb.append((char) c);
>             }
>                       
>       System.out.println("end");
>       } catch (MalformedURLException e) {
>               // TODO Auto-generated catch block
>               e.printStackTrace();
>       } catch (IOException e) {
>               // TODO Auto-generated catch block
>               e.printStackTrace();
>     }
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/javax.net.ssl.SSLException%3A-Unrecognized-SSL-message%2C-plaintext-connecti-tf1899618.html#a12363991
Sent from the Axis - Japanese Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: 
[&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;]
For additional commands, e-mail: 
[&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;]

メールによる返信