刚学WebService就遇到一个问题,按视屏敲的代码,它生成的wsdl页面与自己的不一样,我的没有types,结构完全不同了

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!--
Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<!--
Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://impl.service.kiwifly.cn/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://impl.service.kiwifly.cn/" name="MyServiceImplService">
<import namespace="http://service.kiwifly.cn/" location="http://localhost:8888/ns?wsdl=1"/>
<binding xmlns:ns1="http://service.kiwifly.cn/" name="MyServiceImplPortBinding" type="ns1:IMyService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="add">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="minus">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="MyServiceImplService">
<port name="MyServiceImplPort" binding="tns:MyServiceImplPortBinding">
<soap:address location="http://localhost:8888/ns"/>
</port>
</service>
</definitions>


百度了一下也有人遇到了这个问题,找了一会,终于找到了答案,原来接口实现类与接口必须要在一个包下面,否则就会出现这种情况,我的目录结构

改成



再重新发布就可以了!

<span style="font-size:10px;">This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!--
Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<!--
Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.kiwifly.cn/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://service.kiwifly.cn/" name="MyServiceImplService">
<types>
<xsd:schema>
<xsd:import namespace="http://service.kiwifly.cn/" schemaLocation="http://localhost:8888/ns?xsd=1"/>
</xsd:schema>
</types>
<message name="add">
<part name="parameters" element="tns:add"/>
</message>
<message name="addResponse">
<part name="parameters" element="tns:addResponse"/>
</message>
<message name="minus">
<part name="parameters" element="tns:minus"/>
</message>
<message name="minusResponse">
<part name="parameters" element="tns:minusResponse"/>
</message>
<portType name="IMyService">
<operation name="add">
<input message="tns:add"/>
<output message="tns:addResponse"/>
</operation>
<operation name="minus">
<input message="tns:minus"/>
<output message="tns:minusResponse"/>
</operation>
</portType>
<binding name="MyServiceImplPortBinding" type="tns:IMyService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="add">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="minus">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="MyServiceImplService">
<port name="MyServiceImplPort" binding="tns:MyServiceImplPortBinding">
<soap:address location="http://localhost:8888/ns"/>
</port>
</service>
</definitions></span>



最新文章

  1. Ajax调用处理页面错误信息500的解决思路
  2. java 多线程之wait(),notify,notifyAll(),yield()
  3. Win10 UWP应用发布流程
  4. 说说C#的async和await(转)
  5. word20161129
  6. java Channel
  7. Android Support ;v4、v7、v13的区别
  8. linux mysql添加用户
  9. Linux Master/Baremetal Remote 配置下的裸机调试
  10. WordPress Design Approval System插件‘step’参数跨站脚本漏洞
  11. ajax提交富文本,内容被截断,解决方法及思路
  12. java学习之Java中JDK,JRE和JVM之间的关系(转载)
  13. HTML——JAVASCRIPT练习题——图片轮播
  14. Qt新建线程的方法(四种办法,很详细,有截图)
  15. Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2)(A.暴力,B.优先队列,C.dp乱搞)
  16. 转摘: MySQL详解--锁
  17. scapy基础之一 ----简单命令
  18. php中使用sphinx搜索引擎
  19. DBC格式解析(以文本形式打开)
  20. Python:每日一题005

热门文章

  1. jquery 监控文本框键盘事件(回车事件),附常用keycode值。
  2. inherit与auto
  3. ready和onload
  4. Atitit.jsou&#160;html转换纯文本&#160;java&#160;c#&#160;php
  5. iOS加载程序视图的方式
  6. iOS 中的 NSTimer
  7. VIP - virtual IP address
  8. C# 两个Object比较
  9. Wing IDE 5 的破解
  10. PS网页设计教程XXX——在PS中创建一个漫画书主题网页布局