WSDL - <ports> Element


A <port> element defines an individual endpoint by specifying a single address for a binding.

Here is the grammar to specify a port:

<wsdl:definitions .... >
   <wsdl:service .... > *
      <wsdl:port name="nmtoken" binding="qname"> *
         <-- extensibility element (1) -->
  • The port element has two attributes: name and binding .

  • The name attribute provides a unique name among all ports defined within the enclosing WSDL document.

  • The binding attribute refers to the binding using the linking rules defined by WSDL.

  • Binding extensibility elements are used to specify the address information for the port.

  • A port MUST NOT specify more than one address.

  • A port MUST NOT specify any binding information other than address information.

Here is a piece of code from the Example chapter:

<service name="Hello_Service">
   <documentation>WSDL File for HelloService</documentation>
   <port binding="tns:Hello_Binding" name="Hello_Port">