java - 使用soapUI 和基于HTTPS 的WSDL 生成Web 服务类

标签 java web-services https soapui

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

[ERROR] sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Failed to read the WSDL document: https:///service.wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not .

[ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s):

At least one WSDL with at least one service definition needs to be provided.

            Failed to parse the WSDL.

知道我需要做什么来解决这个问题吗?我假设我必须在某个地方设置安全信息才能允许此请求起作用?

最佳答案

我猜测服务器证书是自签名的或不受信任的。

您需要将服务器的证书导入到您的 Java keystore 中。 (如果您愿意,您可以使用 this method,这看起来比我上次尝试这样做更容易。)

或者,您可以通过浏览器下载 WSDL 和支持架构,然后对本地文件运行 wsimport。 (当您实际调用相关服务时,这种方法可能没有帮助)

关于java - 使用soapUI 和基于HTTPS 的WSDL 生成Web 服务类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3981873/

相关文章:

java - Hystrix:Apache http客户端请求不中断

java - 在 Java 中如何将 Point[] 转换为 ArrayOfPoint?

java - 如何访问Flash内部的外部数据?

c# - 在不访问实际网络服务的情况下针对 WSDL 进行编程

wcf - netsh 添加带有 http url 的 sslcert 是否仍然启用 ssl?

java - 任何众所周知的 Java 库,仅返回 REST API 请求的字段

Java:在运行时从同一 JVM 中获取类的字节码

java - 长时间延迟 Runnable

c# - 带 SSL/TLS 的 wsdl.exe

php - 如何通过 Openshift 访问套接字