gpt4 book ai didi

java - 使用 Ant 从 WSDL 生成客户端 jar 时出现问题

转载 作者:行者123 更新时间:2023-11-29 09:20:15 25 4
gpt4 key购买 nike

我正在尝试使用这样的 Ant 构建文件从 WSDL 生成客户端 jar:

<target name="generateWSClient">
<setproxy proxyhost="proxy" proxyport="port" />

<wsimport wsdl="https://mywsdl" destdir="${build.dir}/clientclasses"
verbose="true" package="com.locationservice.client">
</wsimport>

<jar destfile="${build.dir}/${lis.jar.name}"
basedir="${build.dir}/clientclasses" />

<javac srcdir="${src.dir}" destdir="${build.dir}/clientclasses"
includes="com/locationservice/client/*.java">
<classpath refid="client.classpath" />
</javac>
</target>

但是当我运行 Ant 时出现这个异常:

[wsimport] parsing WSDL...
[wsimport] [ERROR] sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[wsimport] Failed to read the WSDL document: https://mywsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
[wsimport] [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s):
[wsimport] At least one WSDL with at least one service definition needs to be provided.
[wsimport] Failed to parse the WSDL.

关于如何解决这个问题的任何指示?

最佳答案

我认为https://mywsdl<wsimport>必须指向有效的 WSDL 文档。

关于java - 使用 Ant 从 WSDL 生成客户端 jar 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6944371/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com