binding 对 portType 中的 operation 和消息格式进行 message 格式和协议详情的定义(与soap进行binding). 一个 portType 可能有数目不定的 binding. binding 语法如下:

<wsdl:binding name=”nmtoken” type=”qname”> *
<soap:binding style=”nmtoken” transport=”nmtoken”/>
<wsdl:operation name=”nmtoken”> *
<soap:operation soapAction=”nmtoken”/>
<wsdl:input name=”nmtoken”? > ?
</wsdl:input>
<wsdl:output name=”nmtoken”? > ?
</wsdl:output>
<wsdl:fault name=”nmtoken”> *
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>

在 binding 中使用 type attribute 引用 portType.

binding 中的 operation 的名字要与该 binding 引用的 portType 中的 operation 的名字保持一致.

注意:由于 operation 的名字不要求唯一,因此这时会有重名情况,这就要求在 portType 定义时对 operation 的名字进行唯一性命名.

binding 必须而且只能指定一个通信协议,比如 http、smtp等

binding 不能指定 WSDL 实现地址信息

TODO: 本例中出现style、transport和soapAction是因为该绑定使用的是SOAP绑定,详见 http://blog.baturu.com/index.php/2008/04/29/wsdl-11-规范-soap-binding.html