Unregister an endpoint - 7.1

Talend ESB Infrastructure Services Configuration Guide

EnrichVersion
7.1
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
EnrichPlatform
Talend ESB
Talend Runtime
task
Design and Development
Installation and Upgrade

Unregister an endpoint, which has been registered on the Service Locator server, from the Service Locator server. After unregistering the endpoint, it can not be accessed by the Service Locator server.

Parameters: fully qualified service name, endpoint URL.

Return: success or non-success (endpoint did not exist)

The Unregister an endpoint operation is described in LocatorService.wsdl as follows:

<operation name="unregisterEndpoint">
   <input message="lps:unregisterEndpointInput"/>
   <output message="lps:unregisterEndpointOutput"/>
   <fault name="InterruptedExceptionFault"
      message="lps:InterruptedExceptionFault"/>
   <fault name="ServiceLocatorFault" message="lps:ServiceLocatorFault"/>
</operation>
<message name="unregisterEnpointRequest">
   <part element="lpx:unregisterEndpointRequest" name="input"/>
</message>
<message name="unregisterEndpointInput">
   <part name="parameters" element="lpx:unregisterEndpoint"/>
</message>
<message name="unregisterEndpointOutput">
   <part name="parameters" element="lpx:unregisterEndpointResponse"/>
</message>

The related message type definition is separately described in locator-soap-types.xsd and locator-common-types.xsd as follows:

<xsd:element name="unregisterEndpoint">
<xsd:complexType>
   <xsd:sequence>
      <xsd:element name="serviceName" type="xsd:QName"/>
      <xsd:element name="endpointURL" type="xsd:anyURI"/>
   </xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="unregisterEndpointResponse">
<xsd:complexType>
   <xsd:sequence/>
</xsd:complexType>
</xsd:element>

Example of unregistering an endpoint for a specific service provided in project /examples/talend/tesb/locator-service/soap-service/war/:

ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/client.xml");
LocatorService client = (LocatorService) context.getBean("locatorService");

String serviceHost = this.context.getInitParameter("serviceHost");

...

client.unregisterEndpoint(new QName("http://talend.org/esb/examples/", "GreeterService"), serviceHost);