WSDL – WebService Description Language – Web服务描述语言。
–通过XML形式说明服务在什么地方-地址
–通过XML形式说明服务提供什么样的方法 – 如何调用
–服务端给客户端提供的一个说明书
–约束了客户端和服务端之间通信的消息格式

Wsdl文档从下往上读:
Types - 数据类型定义的容器,它使用某种类型系统(一般地使用XML Schema中的类型系统)。(入参和出参的数据类型约束)
Message - 通信消息的数据结构的抽象类型化定义。使用Types所定义的类型来定义整个消息的数据结构(入参和出参)。
Operation - 对服务中所支持的操作的抽象描述,一般单个Operation描述了一个访问入口的请求/响应消息对(方法)。
PortType - 对于某个访问入口点类型所支持的操作的抽象集合,这些操作可以由一个或多个服务访问点来支持(服务类)。 要关心的属性name
Binding - 特定服务访问点与具体服务类的绑定(不看内容,看关系)。
Port - 定义为webservice单个服务访问点。 要关心的属性:name,Binding属性用于查找binding元素

Service- 相关服务访问点的集合,里面有多个服务的访问点,一般都是一个服务访问点,要关心的属性:name

例如:国内手机号码归属地查询WEB服务
http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl

1.Service–找到服务访问点的集合Service:
(1)name属性很重要,在用wsimport客户端调用服务时,首先就要根据name属性创建一个服务访问点集合对象;

<wsdl:service name="MobileCodeWS">

2.Port–定义为webservice单个服务访问点:
(1)name–在用wsimport客户端调用服务时,可以根据name属性获取服务类的接口;
(2)binding–binding属性和标签<wsdl:binding name="" type="">中的name属性关联;

<wsdl:port name="MobileCodeWSSoap" binding="tns:MobileCodeWSSoap"><soap:address location="http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx" />
</wsdl:port>

3.Binding –特定服务访问点与具体服务类的绑定(不看内容,看关系):
(1)name属性–name属性和Port标签的binding属性关联;
(2)type属性–type属性和<wsdl:portType name="">标签中的name属性关联;

    <wsdl:binding name="MobileCodeWSSoap" type="tns:MobileCodeWSSoap"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getMobileCodeInfo"><soap:operation soapAction="http://WebXml.com.cn/getMobileCodeInfo"style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation><wsdl:operation name="getDatabaseInfo"><soap:operation soapAction="http://WebXml.com.cn/getDatabaseInfo"style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding>

4.PortType - 对于某个访问入口点类型所支持的操作的抽象集合,这些操作可以由一个或多个服务访问点来支持(服务类):
(1)name属性–name属性和Binding中的type属性关联;

    <wsdl:portType name="MobileCodeWSSoap"><wsdl:operation name="getMobileCodeInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地省份、地区和手机卡类型信息</h3><p>输入参数:mobileCode = 字符串(手机号码,最少前7位数字),userID = 字符串(商业用户ID)免费用户为空字符串;返回数据:字符串(手机号码:省份 城市 手机卡类型)。</p><br /></wsdl:documentation><wsdl:input message="tns:getMobileCodeInfoSoapIn" /><wsdl:output message="tns:getMobileCodeInfoSoapOut" /></wsdl:operation><wsdl:operation name="getDatabaseInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地数据库信息</h3><p>输入参数:无;返回数据:一维字符串数组(省份 城市 记录数量)。</p><br /></wsdl:documentation><wsdl:input message="tns:getDatabaseInfoSoapIn" /><wsdl:output message="tns:getDatabaseInfoSoapOut" /></wsdl:operation></wsdl:portType>

5.Operation - 对服务中所支持的操作的抽象描述,一般单个Operation描述了一个访问入口的请求/响应消息对(方法),PortType 和 Binding标签下都有Operation标签:
(1)在PortType标签下的Operation标签:

        <wsdl:operation name="getMobileCodeInfo"><wsdl:input message="tns:getMobileCodeInfoSoapIn" /><wsdl:output message="tns:getMobileCodeInfoSoapOut" /></wsdl:operation>

(2)在binding标签下的Operation标签:

        <wsdl:operation name="getMobileCodeInfo"><soap:operation soapAction="http://WebXml.com.cn/getMobileCodeInfo"style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation>

6.Message - 通信消息的数据结构的抽象类型化定义。使用Types所定义的类型来定义整个消息的数据结构(入参和出参)。

    <wsdl:message name="getMobileCodeInfoSoapIn"><wsdl:part name="parameters" element="tns:getMobileCodeInfo" /></wsdl:message>

7.Types - 数据类型定义的容器,它使用某种类型系统(一般地使用XML Schema中的类型系统)。(入参和出参的数据类型约束)

    <wsdl:types><s:schema elementFormDefault="qualified" targetNamespace="http://WebXml.com.cn/"><s:element name="getMobileCodeInfo"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="mobileCode"type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="userID"type="s:string" /></s:sequence></s:complexType></s:element><s:element name="getMobileCodeInfoResponse"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1"name="getMobileCodeInfoResult" type="s:string" /></s:sequence></s:complexType></s:element><s:element name="getDatabaseInfo"><s:complexType /></s:element><s:element name="getDatabaseInfoResponse"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1"name="getDatabaseInfoResult" type="tns:ArrayOfString" /></s:sequence></s:complexType></s:element><s:complexType name="ArrayOfString"><s:sequence><s:element minOccurs="0" maxOccurs="unbounded" name="string"nillable="true" type="s:string" /></s:sequence></s:complexType><s:element name="string" nillable="true" type="s:string" /><s:element name="ArrayOfString" nillable="true"type="tns:ArrayOfString" /></s:schema></wsdl:types>

完整的wsdl文档:

<?xml version="1.0" encoding="utf-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"xmlns:tns="http://WebXml.com.cn/" xmlns:s="http://www.w3.org/2001/XMLSchema"xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"targetNamespace="http://WebXml.com.cn/"><wsdl:documentation><a href="http://www.webxml.com.cn/" target="_blank">WebXml.com.cn</a><strong>国内手机号码归属地查询WEB服务</strong>,提供最新的国内手机号码段归属地数据,每月更新。<br />使用本站 WEB 服务请注明或链接本站:<a href="http://www.webxml.com.cn/" target="_blank">http://www.webxml.com.cn/</a>感谢大家的支持!<br /></wsdl:documentation><wsdl:types><s:schema elementFormDefault="qualified" targetNamespace="http://WebXml.com.cn/"><s:element name="getMobileCodeInfo"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="mobileCode"type="s:string" /><s:element minOccurs="0" maxOccurs="1" name="userID"type="s:string" /></s:sequence></s:complexType></s:element><s:element name="getMobileCodeInfoResponse"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1"name="getMobileCodeInfoResult" type="s:string" /></s:sequence></s:complexType></s:element><s:element name="getDatabaseInfo"><s:complexType /></s:element><s:element name="getDatabaseInfoResponse"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1"name="getDatabaseInfoResult" type="tns:ArrayOfString" /></s:sequence></s:complexType></s:element><s:complexType name="ArrayOfString"><s:sequence><s:element minOccurs="0" maxOccurs="unbounded" name="string"nillable="true" type="s:string" /></s:sequence></s:complexType><s:element name="string" nillable="true" type="s:string" /><s:element name="ArrayOfString" nillable="true"type="tns:ArrayOfString" /></s:schema></wsdl:types><wsdl:message name="getMobileCodeInfoSoapIn"><wsdl:part name="parameters" element="tns:getMobileCodeInfo" /></wsdl:message><wsdl:message name="getMobileCodeInfoSoapOut"><wsdl:part name="parameters" element="tns:getMobileCodeInfoResponse" /></wsdl:message><wsdl:message name="getDatabaseInfoSoapIn"><wsdl:part name="parameters" element="tns:getDatabaseInfo" /></wsdl:message><wsdl:message name="getDatabaseInfoSoapOut"><wsdl:part name="parameters" element="tns:getDatabaseInfoResponse" /></wsdl:message><wsdl:message name="getMobileCodeInfoHttpGetIn"><wsdl:part name="mobileCode" type="s:string" /><wsdl:part name="userID" type="s:string" /></wsdl:message><wsdl:message name="getMobileCodeInfoHttpGetOut"><wsdl:part name="Body" element="tns:string" /></wsdl:message><wsdl:message name="getDatabaseInfoHttpGetIn" /><wsdl:message name="getDatabaseInfoHttpGetOut"><wsdl:part name="Body" element="tns:ArrayOfString" /></wsdl:message><wsdl:message name="getMobileCodeInfoHttpPostIn"><wsdl:part name="mobileCode" type="s:string" /><wsdl:part name="userID" type="s:string" /></wsdl:message><wsdl:message name="getMobileCodeInfoHttpPostOut"><wsdl:part name="Body" element="tns:string" /></wsdl:message><wsdl:message name="getDatabaseInfoHttpPostIn" /><wsdl:message name="getDatabaseInfoHttpPostOut"><wsdl:part name="Body" element="tns:ArrayOfString" /></wsdl:message><wsdl:portType name="MobileCodeWSSoap"><wsdl:operation name="getMobileCodeInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地省份、地区和手机卡类型信息</h3><p>输入参数:mobileCode = 字符串(手机号码,最少前7位数字),userID = 字符串(商业用户ID)免费用户为空字符串;返回数据:字符串(手机号码:省份 城市 手机卡类型)。</p><br /></wsdl:documentation><wsdl:input message="tns:getMobileCodeInfoSoapIn" /><wsdl:output message="tns:getMobileCodeInfoSoapOut" /></wsdl:operation><wsdl:operation name="getDatabaseInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地数据库信息</h3><p>输入参数:无;返回数据:一维字符串数组(省份 城市 记录数量)。</p><br /></wsdl:documentation><wsdl:input message="tns:getDatabaseInfoSoapIn" /><wsdl:output message="tns:getDatabaseInfoSoapOut" /></wsdl:operation></wsdl:portType><wsdl:portType name="MobileCodeWSHttpGet"><wsdl:operation name="getMobileCodeInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地省份、地区和手机卡类型信息</h3><p>输入参数:mobileCode = 字符串(手机号码,最少前7位数字),userID = 字符串(商业用户ID)免费用户为空字符串;返回数据:字符串(手机号码:省份 城市 手机卡类型)。</p><br /></wsdl:documentation><wsdl:input message="tns:getMobileCodeInfoHttpGetIn" /><wsdl:output message="tns:getMobileCodeInfoHttpGetOut" /></wsdl:operation><wsdl:operation name="getDatabaseInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地数据库信息</h3><p>输入参数:无;返回数据:一维字符串数组(省份 城市 记录数量)。</p><br /></wsdl:documentation><wsdl:input message="tns:getDatabaseInfoHttpGetIn" /><wsdl:output message="tns:getDatabaseInfoHttpGetOut" /></wsdl:operation></wsdl:portType><wsdl:portType name="MobileCodeWSHttpPost"><wsdl:operation name="getMobileCodeInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地省份、地区和手机卡类型信息</h3><p>输入参数:mobileCode = 字符串(手机号码,最少前7位数字),userID = 字符串(商业用户ID)免费用户为空字符串;返回数据:字符串(手机号码:省份 城市 手机卡类型)。</p><br /></wsdl:documentation><wsdl:input message="tns:getMobileCodeInfoHttpPostIn" /><wsdl:output message="tns:getMobileCodeInfoHttpPostOut" /></wsdl:operation><wsdl:operation name="getDatabaseInfo"><wsdl:documentation><br /><h3>获得国内手机号码归属地数据库信息</h3><p>输入参数:无;返回数据:一维字符串数组(省份 城市 记录数量)。</p><br /></wsdl:documentation><wsdl:input message="tns:getDatabaseInfoHttpPostIn" /><wsdl:output message="tns:getDatabaseInfoHttpPostOut" /></wsdl:operation></wsdl:portType><wsdl:binding name="MobileCodeWSSoap" type="tns:MobileCodeWSSoap"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getMobileCodeInfo"><soap:operation soapAction="http://WebXml.com.cn/getMobileCodeInfo"style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation><wsdl:operation name="getDatabaseInfo"><soap:operation soapAction="http://WebXml.com.cn/getDatabaseInfo"style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="MobileCodeWSSoap12" type="tns:MobileCodeWSSoap"><soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getMobileCodeInfo"><soap12:operation soapAction="http://WebXml.com.cn/getMobileCodeInfo"style="document" /><wsdl:input><soap12:body use="literal" /></wsdl:input><wsdl:output><soap12:body use="literal" /></wsdl:output></wsdl:operation><wsdl:operation name="getDatabaseInfo"><soap12:operation soapAction="http://WebXml.com.cn/getDatabaseInfo"style="document" /><wsdl:input><soap12:body use="literal" /></wsdl:input><wsdl:output><soap12:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="MobileCodeWSHttpGet" type="tns:MobileCodeWSHttpGet"><http:binding verb="GET" /><wsdl:operation name="getMobileCodeInfo"><http:operation location="/getMobileCodeInfo" /><wsdl:input><http:urlEncoded /></wsdl:input><wsdl:output><mime:mimeXml part="Body" /></wsdl:output></wsdl:operation><wsdl:operation name="getDatabaseInfo"><http:operation location="/getDatabaseInfo" /><wsdl:input><http:urlEncoded /></wsdl:input><wsdl:output><mime:mimeXml part="Body" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="MobileCodeWSHttpPost" type="tns:MobileCodeWSHttpPost"><http:binding verb="POST" /><wsdl:operation name="getMobileCodeInfo"><http:operation location="/getMobileCodeInfo" /><wsdl:input><mime:content type="application/x-www-form-urlencoded" /></wsdl:input><wsdl:output><mime:mimeXml part="Body" /></wsdl:output></wsdl:operation><wsdl:operation name="getDatabaseInfo"><http:operation location="/getDatabaseInfo" /><wsdl:input><mime:content type="application/x-www-form-urlencoded" /></wsdl:input><wsdl:output><mime:mimeXml part="Body" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="MobileCodeWS"><wsdl:port name="MobileCodeWSSoap" binding="tns:MobileCodeWSSoap"><soap:address location="http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx" /></wsdl:port><wsdl:port name="MobileCodeWSSoap12" binding="tns:MobileCodeWSSoap12"><soap12:address
                location="http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx" /></wsdl:port><wsdl:port name="MobileCodeWSHttpGet" binding="tns:MobileCodeWSHttpGet"><http:address location="http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx" /></wsdl:port><wsdl:port name="MobileCodeWSHttpPost" binding="tns:MobileCodeWSHttpPost"><http:address location="http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx" /></wsdl:port></wsdl:service>
</wsdl:definitions>

webservice的WSDL文档详解相关推荐

  1. 英集芯ip6809规格书pdf芯片文档详解及典型电路原理图

    英集芯ip6809芯片是一款无线充电发送端控制器SOC芯片,兼容WPC Qi v1.2.4新标准.支持2-3线圈无线充电发射端应用,支持A28线圈.MP-A8线圈,支持客户线圈定制方案,支持5W.苹果 ...

  2. jsoup解析和遍历一个html文档详解

    解析和遍历一个HTML文档 如何解析一个HTML文档: String html = "<html><head><title>First parse< ...

  3. 在MyEclipse中使用javadoc导出API文档详解

    本篇文档介绍如何在MyEclipse中导出javadoc(API)帮助文档,并且使用htmlhelp.exe和jd2chm.exe生成chm文档. 具体步骤如下: 打开MyEclipse,选中想要制作 ...

  4. 【PDF】java使用Itext生成pdf文档--详解

    [API接口] 一.Itext简介 API地址:javadoc/index.html:如 D:/MyJAR/原JAR包/PDF/itext-5.5.3/itextpdf-5.5.3-javadoc/i ...

  5. BH1750 光照传感器文档详解 及 驱动设计

    前言 最近接触到一个应用,需要在低功耗的产品上加上光照度采集,正好最近有接触到一款光照传感器 BH1750 ,性能价格都合适,那么今天就抽空来好好测试一下. 那么要写一篇测试文章,我会尽量以新手的角度 ...

  6. Swagger文档详解

    1.Swagger介绍 Swagger 是一个规范和完整的框架,用于生成.描述.调用和可视化 RESTful 风格的 Web 服务(http s://swagger.io/). 它的主要作用是: 使得 ...

  7. Dubbo2.7文档详解

    本篇博文参考dubbo官方文档 本编博文参考javaguide之rpc 文章目录 一.RPC 1.1 什么是 RPC? 1.2 为什么要用 RPC? 1.3 RPC 能帮助我们做什么呢? 1.4 RP ...

  8. 关于cxf+spring发布的webservice,wsdl文档中缺少wsdl:types和wsdl:message等标签的问题

    1:首先检查一下是不是要发布的类或接口上边一行是否写了:@WebService这个注解,我就是这样错的... 2:其次就是:看发布后的wsdl文件,是否多了<wsdl:import>标签, ...

  9. 第5节:开发微信小程序之文档详解

    前言 前面4节,我们讲解了为什么要开这一个专栏,以及第一个小程序Hello World,与其说第一个小程序,不如说微信开发者工具为我们创建了一个基础工程项目!然后,又开发了一个真正实现突破0的小程序- ...

最新文章

  1. NeurIPS 2020不用抢票了!官方宣布改线上举办,网友:nice!已白嫖3个顶会
  2. 使用spring aop实现业务层mysql 读写分离
  3. 如何用九条命令在一分钟内检查 Linux 服务器性能?
  4. python2.7配置tensorflow1.5.0和keras2.1.6
  5. Yii的查询搜索函数find findAll findOne:find就是返回结果 findone就是返回一条数据 findall就是返回所有数据
  6. 页面无法滚动_【前端词典】滚动穿透问题的解决方案
  7. 使用Hive和iReport进行大数据分析
  8. 04.卷积神经网络 W1.卷积神经网络(作业:手动/TensorFlow 实现卷积神经网络)
  9. 查找数组连成环形的和最大的连续子数组
  10. mysql可以创建多少条数据类型_mysql支持的数据类型
  11. linux查询hive sql输出文件,数据库-如何将HiveQL查询的结果输出到CSV?
  12. Wannafly挑战赛21: C. 大水题(DP)
  13. kuangbin数学训练1
  14. Windows远程桌面如何设置分辨率
  15. 游戏3C之二——镜头
  16. 如何把PDF转换成word呢?
  17. x64dbg 2022 最新版编译方法
  18. QPushButton 实现保持按下效果(转载​​)
  19. linux下.tar.gz和.gz文件解压详解
  20. springboot解决循环依赖问题

热门文章

  1. 第五届计算和通信技术国际会议【1月大连】
  2. CentOS 安装多种解码器打造Linux的全能播放器
  3. Hadoop授权令牌解释(原标题 Hadoop Delegation Tokens Explained)
  4. Caused by: org.apache.ibatis.ognl.TokenMgrError: Lexical error at line 1, column 43. Encountered: <
  5. 第十三届蓝桥杯(Web 应用开发)线上模拟赛
  6. ZBrush教程_中文教程两套教程和软件的发展史(及涉及领域)网盘下载
  7. 餐饮小程序引流的12种方法
  8. 数据的异质性是什么意思?
  9. android ART 简介
  10. 设置相机水印字体的大小、位置