使用 wsimport 解析 wsdl 时出错
尝试从 https://api.betfair.com/global/v3/BFGlobalService 生成类时.wsdl 与来自 JAX-WS RI 2.2.4-b01 的 wsimport 我收到此警告:
[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.
When trying to generate classes from https://api.betfair.com/global/v3/BFGlobalService.wsdl with wsimport from JAX-WS RI 2.2.4-b01 i get this warning:
[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
What is happening wrong? The file is saved to my disk because when I pass the URL as a parameter it gives-me another error:
[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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也遇到过类似的问题
我们可以安全地忽略警告并继续。
I have also faced similar issue
We can safely ignore the warnings and go ahead.