javax.net.ssl.SSLException : Unrecognized SSL message, 明文连接?

标签 java ssl https asmx axis

<分区>

如何使用 axis jar 从 java 调用托管在 SSL(“https:”)协议(protocol)上的 .net Web 服务 (asmx) 时解决上述异常。

执行代码时收到以下错误消息:

faultDetail: 
 {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
 at com.ibm.jsse2.a.c(a.java:228)
 at com.ibm.jsse2.a.a(a.java:63)
 at com.ibm.jsse2.jc.a(jc.java:465)
 at com.ibm.jsse2.jc.g(jc.java:458)
 at com.ibm.jsse2.jc.a(jc.java:67)
 at com.ibm.jsse2.jc.startHandshake(jc.java:342)
 at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
 at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
 at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
 at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
 at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
 at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
 at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
 at org.apache.axis.client.Call.invoke(Call.java:2767)
 at org.apache.axis.client.Call.invoke(Call.java:2443)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at examples.Example_client.main(Example_client.java:79)

 {http://xml.apache.org/axis/}hostname:D-113020008

最佳答案

您可能使用代理来获取 ssl 内容,但您的代理设置有误。您应该考虑使用 http 作为代理方案,然后使用 https 作为实际内容的方案。这解决了我的问题。

关于javax.net.ssl.SSLException : Unrecognized SSL message, 明文连接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36766709/

上一篇:PHP 事件/SSL : Getting client certificate using PHP Event

下一篇:wordpress - 我应该在 Google 网站站长工具中删除旧的 http 属性吗?

相关文章:

java - 在使用自定义数组适配器的 android ListView 上实现单选单选按钮的最佳方法是什么?

iis - 如何将 IIS 证书列表导出为详细列表?

ruby - 排除不适用于 Rack::SSL

ssl - asp 连接 HTTPS 和 Fiddler 在 WebForms 和 TexView 中显示密码

ssl - 如何在计算机上安装 SSL 证书

java - 数组缓冲区对象被禁用

java - 如何像维护C#应用程序中的配置文件一样维护java应用程序项目中的配置文件?

java - 使用 ExtJS 6 拖放文件

android - HTTPS Elastic Beanstalk (AWS) 到 Android

javascript - 使用node.js/Express从HTTP重定向到HTTPS