WSDL 绑定

 WSDL 绑定

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

WSDL bindings defines the message format and protocol details for a web service.
WSDL 绑定(bindings)定义了网页服务的信息格式和协议细节


Binding to SOAP
绑定到SOAP

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

The binding element has two attributes - the name attribute and the type attribute.
Binding元素有两个属性—name(名称)属性和type(类型)属性

The name attribute (you can use any name you want) defines the name of the binding, and the type attribute points to the port for the binding, in this case the "glossaryTerms" port.
Name属性(你可以任意起名称)定义了绑定的名称,type属性指向了用于绑定的端口,在这个例子里端口是"glossaryTerms"

The soap:binding element has two attributes - the style attribute and the transport attribute.
soap:binding元素有两个属性—style(种类)属性和transport(运送)属性

The style attribute can be "rpc" or "document". In this case we use document. The transport attribute defines the SOAP protocol to use. In this case we use HTTP.
Style属性可以是"rpc" 或"document".在这个例子里我们用"document"属性。Transport属性定义了使用的SOAP协议。这个例子里我们用HTTP

The operation element defines each operation that the port exposes.
Operation元素定义了每项揭示端口操作。

For each operation the corresponding SOAP action has to be defined. You must also specify how the input and output are encoded. In this case we use "literal".
对每项操作而言,相应的SOAP行为都必须被定义。你也必须指定输入和输出是怎样被编码的。在这个例子里我们用"literal"

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值