WSDL 文档

 
b.gif
WSDL 文档
b.gif <wbr>It contains set of definitions to describe a web service.
它包含了一系列描述web service的定义。</wbr>
<wbr>
The WSDL Document Structure
WSDL文档结构A WSDL document describes a web service using these major elements:
WSDL 文档是利用这些主要的元素来描述某个 web service 的:
Element
元素Defines
定义<portType>The operations performed by the web service
web service 执行的操作<message>The messages used by the web service
web service 使用的消息<types>The data types used by the web service
web service 使用的数据类型<binding>The communication protocols used by the web service
web service 使用的通信协议The main structure of a WSDL document looks like this:
一个 WSDL 文档的主要结构是类似这样的:
<definitions>
<types>
<wbr>   definition of types........
</wbr>
</wbr><wbr></types>

<message>
<wbr>   definition of a message....
</wbr>
</wbr><wbr></message>

<portType>
<wbr>   definition of a port.......
</wbr>
</wbr><wbr></portType>

<binding>
<wbr>   definition of a binding....

</wbr>
</wbr><wbr></binding>

</definitions>
A WSDL document can also contain other elements, like extension elements and a service element that makes it possible to group together the definitions of several web services in one single WSDL document.
WSDL 文档可包含其它的元素,比如 extension 元素,以及一个 service 元素,此元素可把若干个 web services 的定义组合在一个单一的 WSDL 文档中。
For a complete syntax overview go to the chapter WSDL Syntax</wbr><wbr>.
如需完整的语法概述,请访问 WSDL 语法</wbr><wbr>。
WSDL Ports
WSDL 端口The <wbr><portType></wbr></wbr><wbr> element is the most important WSDL element.
<wbr><portType></wbr></wbr><wbr>元素是最重要的 WSDL 元素。
It describes a web service, the operations that can be performed, and the messages that are involved.
它可描述一个 web service、可被执行的操作,以及相关的消息。
The <portType> element can be compared to a function library (or a module, or a class) in a traditional programming language.
可以把 <portType> 元素比作传统编程语言中的一个函数库(或一个模块、或一个类)。
WSDL Messages
WSDL 信息The <wbr><message></wbr></wbr><wbr> element defines the data elements of an operation.
<wbr><message></wbr></wbr><wbr>元素定义一个操作的数据元素。
Each message can consist of one or more parts. The parts can be compared to the parameters of a function call in a traditional programming language.
每个信息均由一个或多个部件组成。可以把这些部件比作传统编程语言中一个函数调用的参数。
WSDL Types
WSDL 类型The <wbr><types></wbr></wbr><wbr> element defines the data type that are used by the web service.
<wbr><types></wbr></wbr><wbr>元素定义 web service 使用的数据类型。
For maximum platform neutrality, WSDL uses XML Schema syntax to define data types.
为了最大程度的平台中立性,WSDL 使用 XML Schema 语法来定义数据类型。
WSDL Bindings
WSDL 绑定The <wbr><binding></wbr></wbr><wbr> element defines the message format and protocol details for each port.
<wbr><binding></wbr></wbr><wbr>元素为每个端口定义消息格式和协议细节。
WSDL Example
WSDL 案例This is a simplified fraction of a WSDL document:
这是某个 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>
In this example the <wbr> <portType></wbr></wbr><wbr> element defines "glossaryTerms" as the name of a <wbr>port</wbr></wbr><wbr>, and "getTerm" as the name of an <wbr>operation</wbr></wbr><wbr>.
在上述案例中, <wbr><portType> </wbr></wbr><wbr>元素将 "glossaryTerms" 定义为一个 <wbr>端口</wbr></wbr><wbr>的名称,将 "getTerm" 定义为一项 <wbr>操作</wbr></wbr><wbr>的名称。
The "getTerm" operation has an <wbr>input message</wbr></wbr><wbr> called "getTermRequest" and an <wbr>output message</wbr></wbr><wbr> called "getTermResponse".
"getTerm" 操作包含一条名为"getTermRequest" 的 <wbr>输入信息</wbr></wbr><wbr>和一条名为"getTermResponse".的 <wbr>输出信息</wbr></wbr><wbr>。
The <wbr> <message></wbr></wbr><wbr> elements define the <wbr>parts</wbr></wbr><wbr> of each message and the associated data types.
<wbr><message></wbr></wbr><wbr>元素定义了每个元素 <wbr>部件</wbr></wbr><wbr>以及相关的数据类型。
Compared to traditional programming, glossaryTerms is a function library, "getTerm" is a function with "getTermRequest" as the input parameter and getTermResponse as the return parameter.
对比传统的编程,glossaryTerms 是一个函数库,而 "getTerm" 是带有输入参数 "getTermRequest" 和返回参数 getTermResponse 的一个函数。</wbr>
b.gif
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值