使用带有WSDL over HTTPS的soapUI生成Web服务类 [英] generating web-service classes using soapUI with a WSDL over HTTPS

查看:896
本文介绍了使用带有WSDL over HTTPS的soapUI生成Web服务类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm using SoapUI to generate my web service client classes (using wsimport/jax-ws ri if it makes a difference). I've had no problem with this for several services, however, the one im working on now has a wsdl file which is served via https and I get the following error when I try to generate my client classes.


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

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

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

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 .

[错误] failed.noservice =无法
在提供的内容中找到wsdl:service
WSDL:

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

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

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

            Failed to parse the WSDL.


我想知道如何解决这个问题?我假设某个地方我必须设置安全信息以允许此请求工作?

Any idea of what I have to do to resolve this? I'm assuming somewhere I have to set up security information to allow this request to work?

推荐答案

我猜这个服务器证书是自签名的或不可信的。

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

您需要将服务器的证书导入Java密钥库。 (您可以使用此方法如果您愿意,这看起来比我上次尝试的时候容易。)

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.)

或者,您可以通过浏览器下载WSDL和支持模式,然后运行wsimport对本地文件。 (当您实际调用有问题的服务时,这种方法可能无济于事)

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)

这篇关于使用带有WSDL over HTTPS的soapUI生成Web服务类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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