简体   繁体   English

无法从某些wsdl生成Java客户端代码

[英]Impossible to generate java client code from some wsdl

I'm trying with this specific URL: 我正在尝试使用以下特定网址:

<plugin>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
    <version>1.7.9</version>
    <configuration>
        <wsdlFile>https://web.rbsuat.com/ab/webservices/merchant-ws?wsdl</wsdlFile>
    </configuration>
</plugin>

But got the exception during the plugin execution: 但是在插件执行过程中出现了异常:

[ERROR] Failed to execute goal org.apache.axis2:axis2-wsdl2code-maven-plugin:1.7.9:wsdl2code (default-cli) on project test: Error parsing WSDL: Connection reset -> [Help 1] [错误]在项目测试中无法执行目标org.apache.axis2:axis2-wsdl2code-maven-plugin:1.7.9:wsdl2code(default-cli):解析WSDL错误:连接重置-> [帮助1]

The most likely is that it would be SSLv3 related issue for the newset java when the SSLv3 is disabled and I should enable it by removing the 最有可能的是,当禁用SSLv3时,它将是与newset java有关的SSLv3的问题,我应该通过删除

jdk.tls.disabledAlgorithms=SSLv3

from JRE_HOME/lib/security/java.security , however, I did it and still face the same problem JRE_HOME/lib/security/java.security ,但是,我做到了,仍然遇到相同的问题

Actually, the URL https://web.rbsuat.com/ab/webservices/merchant-ws?wsdl can be reached from the browser without any problem. 实际上,可以从浏览器访问URL https://web.rbsuat.com/ab/webservices/merchant-ws?wsdl

1 - To generate Java client from a given WSDL file, you can use SoapUI tool to achieve that by following the instructions given in below links. 1-要从给定的WSDL文件生成Java客户端,可以使用SoapUI工具按照以下链接中给出的说明来实现。 It basically shows you how you can use different code generation tools like Axis 1.X, Axis 2, CXF 2.X, and .NET 2.0 to generate client code. 它基本说明了如何使用不同的代码生成工具(例如Axis 1.X,Axis 2,CXF 2.X和.NET 2.0)生成客户端代码。

SOAP Code Generation SOAP代码生成

Generating Client JAVA code for WSDL using SOAP UI 使用SOAP UI为WSDL生成客户端JAVA代码

2 - Once the Java client code is generated you can add the following parameter in your Java client before calling the external service to generate the SSL logs. 2-生成Java客户端代码后,您可以在调用外部服务以生成SSL日志之前,在Java客户端中添加以下参数。

System.setProperty("javax.net.debug", "all");

Then by seeing the SSL logs will come to know what is the problem you are facing when trying to call this service. 然后,通过查看SSL日志,您将了解尝试调用此服务时遇到的问题。

the IDE didn't picked up my config changes in jre folder until it was restarted, that was the reason. IDE直到重新启动后才在jre文件夹中获取我的配置更改,这就是原因。 I had to restart my IDE 我必须重新启动我的IDE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM