首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >wsimport不工作

wsimport不工作
EN

Stack Overflow用户
提问于 2014-08-29 11:09:56
回答 5查看 26.6K关注 0票数 16

当我尝试使用以下命令从命令提示符使用wsimport时,它运行得很好:

代码语言:javascript
复制
wsimport -d generated C:\Users\generated\wsdlfile.xml

但是,当我尝试按下面的方式使用wsimport时,它会引发以下错误:

代码语言:javascript
复制
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)工作。可能是什么原因?

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2015-03-03 14:52:05

我已经通过禁用所有代理设置来解决Windows上的问题,如下所示:

代码语言:javascript
复制
Internet Options > Connections > Lan Settings > Disable all check boxes

注意:只是将localhost或我的IP地址作为我的代理设置的一个例外,对我不起作用。

票数 16
EN

Stack Overflow用户

发布于 2015-01-19 07:30:08

我也有同样的问题,在我的例子中,问题是WSDL文件的编码。

尝试从浏览器中打开https://example.com/exampleService.svc?wsdl。如果可以完全解析它,您将看到所有的xml内容。如果不是,至少Firefox会指出问题所在。

希望它能对处于这种情况的人有所帮助

票数 4
EN

Stack Overflow用户

发布于 2014-12-19 03:55:01

这似乎是您正在使用的java版本的一个问题.

确保您有java版本"1.7.x“来解决这个问题。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25567117

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档