<p>I've used Apache CXF to expose about ten java classes as web services.</p>

<p>I've generated clients using CXF, Axis, and .NET.</p>

<p>In Axis and CXF a "Service" or "Locator" is generated. 
From this service you can get a "Port".
The "Port" is used to make individual calls to the methods exposed by the web service.</p>

<p>In .NET the "Service" directly exposes the calls to the web service.</p>

<p>Can someone explain the difference between a port, a service, a locator, and an endpoint when it comes to web services?</p>

<p>Axis:</p>

<pre><code>PatientServiceImplServiceLocator locator = 
    new PatientServiceImplServiceLocator();
PatientService service = locator.getPatientServiceImplPort();
</code></pre>

<p>CXF:</p>

<pre><code>PatientServiceImplService locator = new PatientServiceImplService();
PatientService service = locator.getPatientServiceImplPort();
</code></pre>

<p>.net:</p>

<pre><code>PatientServiceImplService service = new PatientServiceImplService();
</code></pre>

[{'answer_id': 11567, 'author': 'Greg Hurlman', 'author_id': 35, 'author_profile': 'https://Stackoverflow.com/users/35', 'pm_score': 1, 'selected': False, 'text': '<p>As you already mentioned, those terms mean different things in different stacks - there is no one right generic answer for web services.</p>\n'}, {'answer_id': 11619, 'author': 'Kev', 'author_id': 419, 'author_profile': 'https://Stackoverflow.com/users/419', 'pm_score': 4, 'selected': True, 'text': '<p>I\'d hop over to <a href="http://www.w3.org/TR/wsdl.html" rel="noreferrer">http://www.w3.org/TR/wsdl.html</a> which I think explains Port, Service and Endpoint reasonably well. A locator is an implementation specific mechanism that some WS stacks use to provide access to service endpoints.</p>\n'}, {'answer_id': 11639, 'author': 'ScArcher2', 'author_id': 1310, 'author_profile': 'https://Stackoverflow.com/users/1310', 'pm_score': 5, 'selected': False, 'text': "<p>I found the information based on Kevin Kenny's answer, but I figured I'd post it here for others.</p>\n\n<p>A WSDL document defines services as collections of network endpoints, or ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindings. This allows the reuse of abstract definitions: messages, which are abstract descriptions of the data being exchanged, and port types which are abstract collections of operations. The concrete protocol and data format specifications for a particular port type constitutes a reusable binding. A port is defined by associating a network address with a reusable binding, and a collection of ports define a service. Hence, a WSDL document uses the following elements in the definition of network services:</p>\n\n<ul>\n<li><strong>Types</strong>– a container for data type definitions using some type system (such as XSD).</li>\n<li><strong>Message</strong>– an abstract, typed definition of the data being communicated.</li>\n<li><strong>Operation</strong>– an abstract description of an action supported by the service.</li>\n<li><strong>Port Type</strong>–an abstract set of operations supported by one or more endpoints.</li>\n<li><strong>Binding</strong>– a concrete protocol and data format specification for a particular port type.</li>\n<li><strong>Port</strong>– a single endpoint defined as a combination of a binding and a network address.</li>\n<li><strong>Service</strong>– a collection of related endpoints.</li>\n</ul>\n"}, {'answer_id': 23066361, 'author': 'pHneutre', 'author_id': 1585148, 'author_profile': 'https://Stackoverflow.com/users/1585148', 'pm_score': 2, 'selected': False, 'text': '<p>I would like to add that <code>&lt;port&gt;</code> and <code>&lt;endpoint&gt;</code> serve the same purpose, but <code>port</code> is used by WSDL 1.1 and <code>endpoint</code> by WSDL 2.0.</p>\n'}]
['https://Stackoverflow.com/questions/11561', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1310/']