当我尝试使用以下命令从命令提示符使用wsimport时,它运行得很好:
wsimport -d generated C:\Users\generated\wsdlfile.xml但是,当我尝试按下面的方式使用wsimport时,它会引发以下错误:
wsimport -d generated https://example.com/exampleService.svc?wsdl
Failed to read the WSDL document: https://example.com/exampleService.svc?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.
Failed to parse the WSDL.我可以从浏览器访问URL,同样的事情也是从其他系统(从我的PC)工作。可能是什么原因?
发布于 2015-03-03 14:52:05
我已经通过禁用所有代理设置来解决Windows上的问题,如下所示:
Internet Options > Connections > Lan Settings > Disable all check boxes注意:只是将localhost或我的IP地址作为我的代理设置的一个例外,对我不起作用。
发布于 2015-01-19 07:30:08
我也有同样的问题,在我的例子中,问题是WSDL文件的编码。
尝试从浏览器中打开https://example.com/exampleService.svc?wsdl。如果可以完全解析它,您将看到所有的xml内容。如果不是,至少Firefox会指出问题所在。
希望它能对处于这种情况的人有所帮助
发布于 2014-12-19 03:55:01
这似乎是您正在使用的java版本的一个问题.
确保您有java版本"1.7.x“来解决这个问题。
https://stackoverflow.com/questions/25567117
复制相似问题