从weblogic 11g中部署为战争的代码调用soap服务时的握手错误

时间:2017-06-16 10:06:28

标签: java web-services ssl weblogic tls1.2

我的soap服务仅支持TLSv1.2,当我通过在main()方法中编写客户端从本地机器调用soap服务时,它工作正常。我也启用了ssl调试,所以在本地我很清楚能够看到我是客户端正在发送 *** ClientHello,TLSv1.2。

问题是当我在weblogic 10.3.6中将我的代码部署为war文件时,使用ssl调试启用,在日志中我得到了 *** ClientHello,TLSv1。 对于java中的相同客户端代码。

如果客户端是TLSv1,它是否不与服务TLS1.2握手?

在weblogic控制台中,我启用了JSSE。我对在weblogic中需要完成的任何其他配置或者可能是握手错误的可能原因感到无能为力。 任何建议都表示赞赏,请帮助。

我正在粘贴下面的日志以获得更好的说明:

Caused by: javax.xml.ws.WebServiceException: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
        at com.sun.xml.ws.transport.http.client.HttpClientTransport.readResponseCodeAndMessage(HttpClientTransport.java:218)
        at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:204)
        at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:124)
        at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:121)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
        at com.sun.xml.ws.client.Stub.process(Stub.java:272)
        at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
        at com.sun.proxy.$Proxy791.executeProcess(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
        at com.sun.proxy.$Proxy792.executeProcess(Unknown Source)
        at aero.sita.trillium.mobility.util.ServiceHelper.swapAsset(ServiceHelper.java:4309)
        at aero.sita.trillium.mobility.service.impl.IMgmtServiceImpl.swapAssetAsJSON(IMgmtServiceImpl.java:3223)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
        at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:51)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
        at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
        at com.sun.proxy.$Proxy691.swapAssetAsJSON(Unknown Source)
        at aero.sita.trillium.mobility.service.IMgmtServiceUtil.swapAssetAsJSON(IMgmtServiceUtil.java:698)
        ... 69 more
Caused by: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1639)
        at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1607)
        at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1776)
        at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1068)
        at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:890)
        at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:764)
        at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
        at weblogic.security.SSL.jsseadapter.JaSSLEngine$4.run(JaSSLEngine.java:118)
        at weblogic.security.SSL.jsseadapter.JaSSLEngine.doAction(JaSSLEngine.java:732)
        at weblogic.security.SSL.jsseadapter.JaSSLEngine.unwrap(JaSSLEngine.java:116)
        at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:93)
        at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:59)
        at weblogic.socket.JSSEFilterImpl.write(JSSEFilterImpl.java:391)
        at weblogic.socket.JSSESocket$JSSEOutputStream.write(JSSESocket.java:78)

1 个答案:

答案 0 :(得分:1)

  

如果客户端是TLSv1,它是否不与服务TLS1.2握手?

在这种情况下,TLSv1指的是TLS 1.0。

  

我的soap服务仅支持TLSv1.2 ...在weblogic 10.3.6中将我的代码部署为war文件

您的Weblogic安装可能不支持TLS 1.2。根据{{​​3}},自Weblogic 11以及使用Java 7或更高版本以来,它受到支持。