WSDL协议简单介绍

WSDL – WebService Description Language – Web服务描述语言

通过XML形式说明服务在什么地方-地址。

通过XML形式说明服务提供什么样的方法 – 如何调用。

 

<wsdl:service name="MobileCodeWS">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><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 />&nbsp;</wsdl:documentation> 
- <wsdl:port name="MobileCodeWSSoap" binding="tns:MobileCodeWSSoap">
  <soap:address location="http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx" /> 
  </wsdl:port>

 

 

 

<wsdl:binding name="MobileCodeWSSoap" type="tns:MobileCodeWSSoap">

 

 

访问:http://127.0.0.1:8088/ws/phoneSer?WSDL  查看WSDL说明:

  下面的参数在发布service 的时候均已经修改为特定的名字,可读性增强了。参考:http://www.cnblogs.com/qlqwjy/p/7554647.html

<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.4-b01. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.4-b01. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://dd.ws.it.cn" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://dd.ws.it.cn" name="PhoneManager1">
<types>
<xsd:schema>
<xsd:import namespace="http://dd.ws.it.cn" schemaLocation="http://127.0.0.1:8088/ws/phoneSer?xsd=1"></xsd:import>
</xsd:schema>
</types>
<message name="getMObileInfo">
<part name="parameters" element="tns:getMObileInfo"></part>
</message>
<message name="getMObileInfoResponse">
<part name="parameters" element="tns:getMObileInfoResponse"></part>
</message>
<portType name="PhoneService">
<operation name="getMObileInfo">
<input wsam:Action="http://dd.ws.it.cn/PhoneService/getMObileInfoRequest" message="tns:getMObileInfo"></input>
<output wsam:Action="http://dd.ws.it.cn/PhoneService/getMObileInfoResponse" message="tns:getMObileInfoResponse"></output>
</operation>
</portType>
<binding name="PhoneServicePortBinding" type="tns:PhoneService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<operation name="getMObileInfo">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="PhoneManager1">
<port name="PhoneServicePort" binding="tns:PhoneServicePortBinding">
<soap:address location="http://127.0.0.1:8088/ws/phoneSer"></soap:address>
</port>
</service>
</definitions>

 

 

 

 

 

 

 

访问:http://127.0.0.1:8088/ws/phoneSer?xsd=1    查看XML约束文档

  xsd对输入参数,输出参数均有定义

 

 

 

------------------一个完整的介绍-----------------------------------------

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值