1.WSDL 简介
来源:互联网 发布:立冬为什么吃饺子 知乎 编辑:程序博客网 时间:2024/06/02 06:01
WSDL 是基于 XML 的用于描述 Web Services 以及如何访问 Web Services 的语言。
WSDL 文档
<definitions><types> definition of types........</types><message> definition of a message....</message><portType> definition of a port.......</portType><binding> definition of a binding....</binding></definitions>
<message name="getTermRequest"> <part name="term" type="xs:string"/></message><message name="getTermResponse"> <part name="value" type="xs:string"/></message><portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest"/> <output message="getTermResponse"/> </operation></portType>
WSDL 端口
One-Way 操作
一个 one-way 操作的例子:
<message name="newTermValues"> <part name="term" type="xs:string"/> <part name="value" type="xs:string"/></message><portType name="glossaryTerms"> <operation name="setTerm"> <input name="newTerm" message="newTermValues"/> </operation></portType >
Request-Response 操作
一个 request-response 操作的例子:
<message name="getTermRequest"> <part name="term" type="xs:string"/></message><message name="getTermResponse"> <part name="value" type="xs:string"/></message><portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest"/> <output message="getTermResponse"/> </operation></portType>
在这个例子中,端口 "glossaryTerms" 定义了一个名为 "getTerm" 的 request-response 操作。"getTerm" 操作会请求一个名为 "getTermRequest" 的输入消息,此消息带有一个名为 "term" 的参数,并将返回一个名为 "getTermResponse" 的输出消息,此消息带有一个名为 "value" 的参数。
WSDL 绑定
<message name="getTermRequest"> <part name="term" type="xs:string" /></message><message name="getTermResponse"> <part name="value" type="xs:string" /></message><portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest" /> <output message="getTermResponse" /> </operation></portType><binding type="glossaryTerms" name="b1"><soap:binding style="document"transport="http://schemas.xmlsoap.org/soap/http" /> <operation> <soap:operation soapAction="http://example.com/getTerm" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> </operation></binding>
WSDL 和 UDDI
完整的 WSDL 语法
<wsdl:definitions name="nmtoken"? targetNamespace="uri"> <import namespace="uri" location="uri"/> * <wsdl:documentation .... /> ? <wsdl:types> ? <wsdl:documentation .... /> ? <xsd:schema .... /> * </wsdl:types> <wsdl:message name="ncname"> * <wsdl:documentation .... /> ? <part name="ncname" element="qname"? type="qname"?/> * </wsdl:message> <wsdl:portType name="ncname"> * <wsdl:documentation .... /> ? <wsdl:operation name="ncname"> * <wsdl:documentation .... /> ? <wsdl:input message="qname"> ? <wsdl:documentation .... /> ? </wsdl:input> <wsdl:output message="qname"> ? <wsdl:documentation .... /> ? </wsdl:output> <wsdl:fault name="ncname" message="qname"> * <wsdl:documentation .... /> ? </wsdl:fault> </wsdl:operation> </wsdl:portType> <wsdl:serviceType name="ncname"> * <wsdl:portType name="qname"/> + </wsdl:serviceType> <wsdl:binding name="ncname" type="qname"> * <wsdl:documentation .... /> ? <-- binding details --> * <wsdl:operation name="ncname"> * <wsdl:documentation .... /> ? <-- binding details --> * <wsdl:input> ? <wsdl:documentation .... /> ? <-- binding details --> </wsdl:input> <wsdl:output> ? <wsdl:documentation .... /> ? <-- binding details --> * </wsdl:output> <wsdl:fault name="ncname"> * <wsdl:documentation .... /> ? <-- binding details --> * </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="ncname" serviceType="qname"> * <wsdl:documentation .... /> ? <wsdl:port name="ncname" binding="qname"> * <wsdl:documentation .... /> ? <-- address details --> </wsdl:port> </wsdl:service></wsdl:definitions>
0 0
- 1.WSDL 简介
- wsdl简介
- WSDL简介
- WSDL简介
- WSDL 简介
- WSDL 简介
- WSDL 简介
- WSDL 简介 2
- WebServices简介 SOAP\WSDL
- [WSDL]WSDL(web service document language)简介
- WSDL简介及WSDL如何查看
- Web服务和WSDL简介
- WSDL简介及编写步骤
- Web服务和WSDL简介收藏
- Web服务和WSDL简介收藏
- 【转】WSDL文件简介(附例子)
- WSDL
- wsdl
- iOS:常见错误总结
- 关于php规范的PSR-4
- hello
- asp.net 操作ftp上传下载 实战
- cenos 下的一些常用命令及技巧收集篇
- 1.WSDL 简介
- IOS视图层次结构
- iOS的开发内购全套图文教程
- mac osx 系统好软件
- 【ZOJ 1500】 Pre-Post-erous!
- MySQL时间戳转日期
- Android Studio 的小白Debug日志
- hello,CSDN
- oracle使用数据导出与导入