Skip to main content
Skip table of contents

Ports

A port defines an individual endpoint by specifying a single address for a binding.
There is no model element that corresponds to a WSDL port because the address information is mapped to the location of service and port type instances in a deployment diagram. Binding information like the transport protocol – for instance HTTP – or the network port are mapped to tagged values residing on instances in the deployment diagram.

It is possible that several WSDL ports refer to different bindings which then use the same port type. For example, HTTP and HTTP(S) services might have the same interfaces but obviously a different binding. In such a case, the Importer would generate two UML port type instances containing different protocol tagged values. Both port type instances would be instances of the same port type. The following table illustrates this by comparing a WSDL fragment that define several ports using different bindings but always the same port type:

Figure: Several ports using different bindings but the same port type



HTML/XML
<portType name="StockQuotePortType">
	<operation name="GetLastTradePrice">
    	<input message="tns:GetLastTradePriceInput"/>
      	<output message="tns:GetLastTradePriceOutput"/>
   	</operation>
</portType>

<binding name="StockQuoteSoapBinding1" type="tns:StockQuotePortType">
   	<soap:binding style="document"
                  transport="http://schemas.xmlsoap.org/soap/http"/>
   	<operation name="GetLastTradePrice">
    	<soap:operation soapAction="http://example.com/GetLastTradePrice"/>
      	<input>
        	<soap:body use="literal"/>
      	</input>
      	<output>
        	<soap:body use="literal"/>
      	</output>
   	</operation>
</binding>

<binding name="StockQuoteSoapBinding2" type="tns:StockQuotePortType">
   	<soap:binding style="document"
                  transport="http://schemas.xmlsoap.org/soap/http"/>
   	<operation name="GetLastTradePrice">
    	<soap:operation soapAction="http://example.com/GetLastTradePrice"/>
      	<input>
        	<soap:body use="literal"/>
      	</input>
      	<output>
       	 <soap:body use="literal"/>
      	</output>
   	</operation>
</binding>

<service name="StockQuoteService">
	<documentation>My first service</documentation>
   	<port name="StockQuotePort1" binding="tns:StockQuoteSoapBinding1">
      	<soap:address location="http://example.com/stockquote"/>
   	</port>
   	<port name="StockQuotePort2" binding="tns:StockQuoteSoapBinding2">
      	<soap:address location="https://example.com/stockquote"/>
   	</port>
   	<port name="StockQuotePort3" binding="tns:StockQuoteSoapBinding2">
      	<soap:address location="https://example.backup.com/stockquote/"/>
   	</port>
</service>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.