WSDL 端口

 WSDL 端口

作者:w3pop.com 翻译/整理:w3pop.com
<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>

A WSDL port describes the interfaces (legal operations) exposed by a web service.
WSDL端口描述了由网页服务所揭示的界面(interface)(合法操作)


WSDL Ports
WSDL端口

The <portType> element is the most important WSDL element.
<portType>元素是最重要的WSDL元素。

It defines a web service, the operations that can be performed, and the messages that are involved.
它定义了网页服务,可进行的操作,以及涉及到的信息。

The port defines the connection point to a web service. It can be compared to a function library (or a module, or a class) in a traditional programming language. Each operation can be compared to a function in a traditional programming language.
端口定义了与网页服务的连接点。它可以比作是传统设计语言里的函数库(或一块模板,或一个类)。每项操作可比成是传统设计语言里的一个函数。


Operation Types
操作类型

The request-response type is the most common operation type, but WSDL defines four types:
请求—回操作类型是最常见的操作类型,但WSDL定义的有四种:

Type
类型
Definition
定义
One-wayThe operation can receive a message but will not return a response
可接受信息但不回复的操作
Request-responseThe operation can receive a request and will return a response
接受并回复信息的操作
Solicit-responseThe operation can send a request and will wait for a response
可发出请求并会等待回复的操作
NotificationThe operation can send a message but will not wait for a response
可发出信息但不会等待回复的操作


One-Way Operation
单向操作

A one-way operation example:
单向操作的例子:

<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 >

In this example the port "glossaryTerms" defines a one-way operation called "setTerm".
在这个例子里"glossaryTerms端口定义了称作"setTerm".的单向操作

The "setTerm" operation allows input of new glossary terms messages using a "newTermValues" message with the input parameters "term" and "value". However, no output is defined for the operation.
"setTerm"操作允许利用输入参数为“term"和"value"的名为"newTermValues"的信息进行大量全新条款信息的输入。 但是,这项操作没有定义有关输出的内容。


Request-Response Operation
请求—回复 操作

A request-response operation example:
一个“请求—回复”操作的例子:

<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 port "glossaryTerms" defines a request-response operation called "getTerm".
这个例子里端口"glossaryTerms"定义了一个名为"getTerm"的“请求—回复”操作

The "getTerm" operation requires an input message called "getTermRequest" with a parameter called "term", and will return an output message called "getTermResponse" with a parameter called "value".
"getTerm"操作需要一个参数为"term"的名为"getTermRequest"的输入信息,并且会返回一条参数为"value".的名为“etTermResponse"的输出信息

<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值