generating web-service classes using soapUI with a WSDL over HTTPS

*爱你&永不变心* 提交于 2019-12-11 07:07:33

问题


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.

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

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?


回答1:


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)



来源:https://stackoverflow.com/questions/3981873/generating-web-service-classes-using-soapui-with-a-wsdl-over-https

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!