java jdk自带的发布服务,wsimport命令生成客户端出错。

醉雨听风 2014-04-11 12:54:34
服务发布成功,能访问到服务也可以访问到wsdl文件,使用wsimport命令生成客户端代码的时候出错。
提示错误
[ERROR] Unexpected end of file from server

Failed to read the WSDL document: http://localhost:8080/123/hell, because 1) cou
ld not find the document; /2) the document could not be read; 3) the root elemen
t 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.
...全文
1756 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
joenacagia 2016-08-31
  • 打赏
  • 举报
回复
换一个新的端口号,重新编译一次,只能一次,就好了 - -
a232698 2016-07-01
  • 打赏
  • 举报
回复
这个原因你可以从下面两个原因排除: 1、你电脑是否设置了代理,如果设置了,建议去掉代理; 2、webservice的地址不能用127.0.0.1或者localhost;正确的做法应该是使用你本机的ip地址,使用ipconfig 查看你本机的ip; 例如: 正确的做法: Endpoint.publish("http://172.30.67.100:8888/MyWebService",new TestWs()); 错误的做法 Endpoint.publish("http://localhost:8888/MyWebService",new TestWs()); Endpoint.publish("http://127.0.0.1:8888/MyWebService",new TestWs());
键盘上的农民 2016-03-22
  • 打赏
  • 举报
回复
http://www.cnblogs.com/yisheng163/p/4524808.html?utm_source=tuicool我参考这个做也出现此类问题。

解决办法:去eclipse里把Service那个类再编译下 别关控制台那个红色停止的服务。

再去浏览器测试
http://localhost:8080/Service/ServiceHello?wsdl(个人情况名字可能不一样)
这个时候出一堆代码就成功了一般。
最后再去编译 就成了
lianren879 2015-09-28
  • 打赏
  • 举报
回复
地址后面加个 /?wsdl 就好了
it鸟 2015-08-20
  • 打赏
  • 举报
回复
希望大神关注。调试不成功
wunaihao 2015-01-15
  • 打赏
  • 举报
回复
同求 相同的问题
houmeng133 2014-09-09
  • 打赏
  • 举报
回复
有人能帮忙解决吗?
hbalxh99 2014-09-05
  • 打赏
  • 举报
回复
大牛快给个解决方案,我也卡这了
jeck5000 2014-07-29
  • 打赏
  • 举报
回复
我也遇到这个问题了。。。。。。。。。
haorengoodman 2014-04-11
  • 打赏
  • 举报
回复
http://localhost:8080/123/hell 这个服务起了没有
  • 打赏
  • 举报
回复
wsdl文件不完整吧

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧