简体   繁体   English

SSLException:无法识别的SSL消息,AXIS Java应用程序中的纯文本连接错误

[英]SSLException: Unrecognized SSL message, plaintext connection error in AXIS java application

I have java app that uses Axis to get data from web service. 我有一个使用Axis从Web服务获取数据的Java应用程序。 web service is accessed via HTTPS. 通过HTTPS访问Web服务。 It works fine on my local PC, but customer uses proxy. 在我的本地PC上运行正常,但是客户使用代理。 I added setting for proxy: 我添加了代理设置:

System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", host);
System.getProperties().put( "proxyPort", port);
Authenticator.setDefault(new Authenticator() {
    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(username,
            password.toCharArray());
    }
});

but customers get exception: 但是客户得到例外:

faultDetail: 
    {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    ...

Can anybody help here? 有人可以帮忙吗?

 System.getProperties().put( "proxySet", "true" );

That does nothing. 那什么也没做。 Remove. 去掉。 There is no such property in the JDK. JDK中没有此类属性。

 System.getProperties().put( "proxyHost", host);
 System.getProperties().put( "proxyPort", port);

If you are using SSL these should be https.proxyHost/https.proxyPort respectively. 如果您使用的是SSL,则应分别为https.proxyHost / https.proxyPort。 For plaintext connections, http.proxyHost/http.proxyPort. 对于纯文本连接,请访问http.proxyHost / http.proxyPort。

Was unable to solve this problem. 无法解决此问题。 Our app was rewritten using plain HTTP POST requests (with Apache HTTPClient 3.0), ie without Axis. 我们的应用程序是使用简单的HTTP POST请求(使用Apache HTTPClient 3.0)重写的,即没有Axis。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SSLException:无法识别的 SSL 消息,明文连接? 通过代理在 Camel 中发送 https POST 时出错 - SSLException: Unrecognized SSL message, plaintext connection? error while sending https POST in Camel via PROXY Jmeter 侦听器显示“javax.net.ssl.SSLException:无法识别的 SSL 消息,纯文本连接?” - Jmeter listener showing “ javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?” 无法发送邮件 - javax.net.ssl.SSLException:无法识别的 SSL 消息,纯文本连接? - Unable to Send Mail - javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? 随机出现的javax.net.ssl.SSLException:无法识别的SSL消息,明文连接? - Random occurence of javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? 获取源网页的源代码,javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? - get source web page's source code, javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? spotify/dockerfile-maven 插件:无法构建映像:javax.net.ssl.SSLException:无法识别的 SSL 消息,纯文本连接 - spotify/dockerfile-maven plugin: Could not build image: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection 无法识别的 SSL 消息,明文连接? 例外 - Unrecognized SSL message, plaintext connection? Exception 连接到IMAP javax.net.ssl.SSLException:无法识别的SSL消息 - Connecting to IMAP javax.net.ssl.SSLException: Unrecognized SSL message javax.net.ssl.SSLException:不支持或无法识别的 SSL 消息 - javax.net.ssl.SSLException: Unsupported or unrecognized SSL message ftp4j:client.login返回无法识别的SSL消息,纯文本连接? - ftp4j: client.login returns Unrecognized SSL message, plaintext connection?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM