我想使用wsdl导入Web服务。服务器使用的是TLSv1.2。
我使用java代码通过设置System.setProperty("https.protocols", "TLSv1.2");
连接到服务器
我使用的是Java 1.7.0_65,在使用wsimport的时候,我如何做同样的事情呢?
当我尝试wsimport <wsdl-url>
时
parsing WSDL...
[ERROR] Received fatal alert: protocol_version
Failed to read the WSDL document: https://<server-name>/Test/Test/Transform?wsdl, because 1) could not find the document; /2) the document cou
ld not be read; 3) the root element of the document is not <wsdl:definitions>.
[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.
2条答案
按热度按时间hpcdzsge1#
agyaoht72#
请先设置JAVA_TOOL_OPTIONS!
然后,照常执行wsimport