javax.net.ssl.SSLException:无法识别的SSL消息,明文连接? [英] javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

查看:6514
本文介绍了javax.net.ssl.SSLException:无法识别的SSL消息,明文连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

How to resolve the above exception while invoking a .net web service (asmx) hosted on SSL ("https:") protocol from java using axis jars.

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

Receving the following error message while executing the code:

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作为实际内容的方案。这解决了我的问题。

It is possible that you are using a proxy to get the ssl content, but your proxy setup is wrong. You should consider using http as proxy scheme, and then https as your scheme for the actual content. This solved my problem.

这篇关于javax.net.ssl.SSLException:无法识别的SSL消息,明文连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆