使用wsimport解析wsdl时出错

问题描述

| 当尝试使用来自JAX-WS RI 2.2.4-b01的wsimport从https://api.betfair.com/global/v3/BFGlobalService.wsdl生成类时,出现以下警告:
[WARNING] src-resolve: Cannot resolve the name \'types:LoginReq\' to a(n) \'type deFinition\' component.
  line 1841 of file:/Users/Daniel/Desktop/lett/wsdl/BFGlobalService.wsdl#types?schema2

[WARNING] src-resolve: Cannot resolve the name \'types:LoginReq\' to a(n) \'type deFinition\' component.
  line 1841 of file:/Users/Daniel/Desktop/lett/wsdl/BFGlobalService.wsdl#types?schema2
发生了什么事?该文件被保存到磁盘,因为当我将URL作为参数传递时,它给了我另一个错误
[ERROR] java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Failed to read the WSDL document: https://api.betfair.com/global/v3/BFGlobalService.wsdl,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>.


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

解决方法

        我也遇到过类似的问题
src-resolve: Cannot resolve the name \'types:LoginReq\' to a(n) \'type definition\' component.
我们可以放心地忽略警告并继续进行。