忽略Axis客户端上的WCF服务的认证身份验证 [英] Ignore certification authentication on Axis client for WCF service

查看:267
本文介绍了忽略Axis客户端上的WCF服务的认证身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为WCF服务创建了一个轴客户端(客户端是由Eclipse生成的,使用WSDL作为输入)。

I created an axis client to WCF service (the client was generated by Eclipse, using the WSDL as an input).

客户端在使用HTTP时工作正常。

The client works fine when using HTTP.

使用HTTPS时我遇到以下异常:

When using HTTPS I'm getting the following exception:

javax.net.ssl.SSLHandshakeException:sun .security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

我理解错误,但我不想给它一个证书所在的地方。

I understand the error, but I don't want to give it a place where the certificates are located.

我想告诉Axis避免这一步(接受任何证书而不检查它) 。

I want to tell Axis to avoid this step (accept any certificate without checking it).

我知道如何使用HttpsURLConnection(创建一个什么都不做的自定义验证器),但我不知道如何用轴...(我如何告诉轴使用我的自定义验证器,或者更好,我怎么能告诉它完全忽略这一步。)

I know how to do it with HttpsURLConnection (create a custom validator which does nothing), but I don't know how to do it with axis... (How can I tell axis to use my custom validator, or better, how can I tell it to ignore this step at all).

有人可以帮忙p me?

Can someone help me?

谢谢,

Mattan

推荐答案

我遇到了同样的问题并使用以下方法修复:

I had the same problem and fixed it using:

AxisProperties.setProperty("axis.socketSecureFactory","org.apache.axis.components.net.SunFakeTrustSocketFactory");

如果这不起作用,请看看这里

In case this doesn't work, have a look here.

这篇关于忽略Axis客户端上的WCF服务的认证身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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