<!--一次webservice调用,其实并不是方法调用,而是发送SOAP消息 ,即xml片段-->
<!--以上一篇中的wsdl文档为例,这里我将注释写到文档中 -->
<!--targetNamespace 相当于java中的package -->
<!--实际项目中应该会有wsdl:import标签,和java总的import概念是样的 -->
<!--xmlns相当于java中的import,里面的地址,和地址打开后里面的内容的targetNamespace是对应的 -->
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://hello.test.com/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
name="HelloWorldWS" targetNamespace="http://hello.test.com/">
<!--types里面是标准的xml文档 -->
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://hello.test.com/" elementFormDefault="unqualified"
targetNamespace="http://hello.test.com/" version="1.0">
<xs:element name="sayHello" type="tns:sayHello" />
<xs:element name="sayHelloResponse" type="tns:sayHelloResponse" />
<xs:complexType name="sayHello">
<!-- 这里sequence里面是空的是因为没有参数,通常有参数的时候还有形如: -->
<!-- <xs:element minOccurs="0"> name="return" type="xs:string"/> -->
<!-- 这样的子元素。其中minOccurs表示最少出现0次,没有写明最多出现多少次,默认最多就是出现一次 -->
<xs:sequence />
</xs:complexType>
<xs:complexType name="sayHelloResponse">
<xs:sequence />
</xs:complexType>
</xs:schema>
</wsdl:types>
<!-- webservice 接口中的每一个方法对应两个message -->
<wsdl:message name="sayHello">
<wsdl:part element="tns:sayHello" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="sayHelloResponse">
<wsdl:part element="tns:sayHelloResponse" name="parameters"></wsdl:part>
</wsdl:message>
<!-- portType下面包含N个operation,每一个operation对应一个操作s -->
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHello">
<!-- 传入消息为sayHello -->
<wsdl:input message="tns:sayHello" name="sayHello"></wsdl:input>
<!-- 传出消息为 -->
<wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldWSSoapBinding" type="tns:HelloWorld">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="sayHello">
<soap:operation soapAction="" style="document" />
<wsdl:input name="sayHello">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="sayHelloResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldWS">
<wsdl:port binding="tns:HelloWorldWSSoapBinding" name="HelloWorldImplPort">
<soap:address location="http://localhost:1234/ws" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

最新文章

  1. EF Code First 初体验
  2. DotNet的JSON序列化与反序列化
  3. iOS开发——高级篇——通讯录
  4. python2.7到python3代码转换脚本2to3的一些介绍
  5. mysql 启动 pid报错解决方法
  6. 小甲鱼python视频弟十二讲(关于字符串的方法及注释下)
  7. window下,加载redis拓展
  8. Poj(2349),最小生成树的变形
  9. sql 执行计划
  10. UITextField限制字数的方法
  11. javascript笔记05:函数表达式和函数语句的区别
  12. Bootstrap--组件之下拉菜单
  13. 记录IOS入门的过程
  14. workflow4.0学习资料
  15. 浅谈层次化的AI架构
  16. 一行代码实现iOS序列化与反序列化
  17. (转)log4net使用详解
  18. Java并发编程小记
  19. Spring Uploading Files
  20. Unity 特殊文件夹 Assets Resources StreamingAssets Editor Plugins......

热门文章

  1. ndk学习14: 进程
  2. Python类的特点 (3) :静态方法与类方法
  3. java面试宝典(蓝桥学院)
  4. linux上进程状态查询
  5. [20160731][转]JAVA当中变量什么时候需要初始化
  6. word to word
  7. Flatten 2D Vector
  8. 抓取网页内容生成kindle电子书
  9. android快速开发--常用utils类
  10. 【mysql】利用Navicat for MySQL的使用