Skip to main content

Unregister an endpoint

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);

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!