【问题标题】:Generating source code with jaxws-maven-plugin from WSDL over HTTPS通过 HTTPS 从 WSDL 使用 jaxws-maven-plugin 生成源代码
【发布时间】:2014-05-15 16:13:32
【问题描述】:

我正在通过 HTTPS 使用 jaxws-maven-plugin 生成源代码:

<executions>
    <execution>
        <id>wsdl_new_xxx-exec</id>
        <goals>
            <goal>wsimport</goal>
        </goals>
        <configuration>
            <sourceDestDir>${project.build.directory}/generated</sourceDestDir>
            <args>
                <arg>-B-XautoNameResolution</arg>
            </args>
            <wsdlUrls>
                <wsdlUrl>https://example.com/xxx.asmx?WSDL</wsdlUrl>
            </wsdlUrls>
            <packageName>x.y.z</packageName>
        </configuration>
    </execution>
</executions>

但是在构建期间我得到:

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

我知道解决方案是将证书添加到 JRE 密钥库,但问题是这将在 CI 系统上运行,该系统具有大量可能的节点,我无法控制这些节点,因此无法将证书安装到所有节点的 JRE。

我该如何解决这个问题?无需将 WSDL 文件与 pom.xml 一起使用。

【问题讨论】:

    标签: java maven jaxws-maven-plugin


    【解决方案1】:

    这是一个简单的解决方案:将 WSDL 的本地副本存储在您的src/main/resources 目录中,并将其用作jaxws-maven-plugin 的参考。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-30
      • 1970-01-01
      • 1970-01-01
      • 2013-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-05
      相关资源
      最近更新 更多