1

我正在使用 SoapUI 生成我的 Web 服务客户端类(如果有区别,则使用 wsimport/jax-ws ri)。对于几个服务,我对此没有任何问题,但是,我现在正在处理的一个有一个通过 https 提供的 wsdl 文件,当我尝试生成我的客户端类时出现以下错误。

[错误] sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径

读取WSDL文档失败:https:///service.wsdl,因为1)找不到文档;/2) 文件无法读取;3) 文档的根元素不是 .

[ERROR] failed.noservice=在提供的 WSDL(s) 中找不到 wsdl:service:

需要提供至少一个具有至少一个服务定义的 WSDL。

            Failed to parse the WSDL.

知道我必须做些什么来解决这个问题吗?我假设我必须在某个地方设置安全信息以允许此请求工作?

4

1 回答 1

0

I'd guess that server certificate is self-signed or otherwise untrusted.

You need to import the server's certificate into your Java keystore. (You can use this method if you wish, which looks easier than the last time I tried to do it.)

Alternatively, you can download the WSDL and supporting schemas via a browser and then run wsimport on the local files. (This approach probably won't help when you come to actually invoke the service in question)

于 2010-10-20T22:45:56.820 回答