在Java8中,使用
生成Web服务java类wsimport -keep http://sasikumar:8080/SimpleWebServiceServer/AdditionService?wsdl
我不能从生成的文件列表中找到MyServicePort.java(AdditionPort.java)类
所以任何人都给我一些关于编写没有MyServicePort.java(AdditionPort.java)类的客户端存根的想法
答案 0 :(得分:3)
这个答案有点晚了。我在使用maven插件jaxws-maven-plugin
时遇到了同样的问题。我正准备为某些Microsoft服务生成客户端代码,一切都很顺利,但缺少端口和服务类。在启用调试时,我看到了根本原因,有消息:
[WARNING] Ignoring SOAP port "WSHttpBinding_IMyService": it uses non-standard SOAP 1.2 binding.
You must specify the "-extension" option to use this binding.
line 1 of https://my.address.to.wsdl
[WARNING] Service "MyService" does not contain any usable ports. try running wsimport with -extension switch.
line 1 of https://my.address.to.wsdl
添加" -extension"解决了问题。