WSDL - <ports> 元素
<port> 元素通过为绑定指定单个地址来定义单个端点。
以下是指定端口的语法−
<wsdl:definitions .... >
<wsdl:service .... > *
<wsdl:port name = "nmtoken" binding = "qname"> *
<-- extensibility element (1) -->
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
port 元素有两个属性:name 和 binding 。
name 属性在封闭的 WSDL 文档中定义的所有端口中提供唯一的名称。
binding 属性引用使用 WSDL 定义的链接规则的绑定。
绑定扩展元素用于指定端口的地址信息。
端口不得指定多个地址。
端口不得指定除地址信息之外的任何绑定信息。
以下是示例章节中的一段代码 −
<service name = "Hello_Service">
<documentation>WSDL File for HelloService</documentation>
<port binding = "tns:Hello_Binding" name = "Hello_Port">
<soap:address
location = "http://www.examples.com/SayHello/">
</port>
</service>

