Earlier versions of WSO2 G-Reg supported technologies like UDDI and WS-Discovery for discovering services. They are used with SOAP-based services. However, since modern services are mostly REST-based, now WSO2 G-Reg supports REST API and the service discovery client for this capability.
If you have services deployed in the WSO2 Enterprise Service Bus (WSO2 ESB) or WSO2 Enterprise Integrator (WSO2 EI), you can discover them using the service discovery client. This client connects to the WSO2 ESB/EI server and imports the services, which are deployed in them into the G-Reg server after finding them. It imports metadata (endpoint, name, namespace, etc.), WSDLs and XSDs of those services.
Follow the steps below to configure the service discovery client.
- Download WSO2 G-Reg and WSO2 ESB/WSO2 EI products and unzip them.
Apply a port offset in the
<ESB_HOME>/repository/conf/carbon.xmlfile (or the
By default, both servers are running on the 9443 port. Therefore, you have to change either of the server ports.
<ESB_HOME>/repository/components/plugins/org.wso2.carbon.service.mgt.stub_4.x.x.jarfile (or the
<EI_HOME>/WSO2/components/plugins/org.wso2.carbon.service.mgt.stub_4.x.x.jarfile) to the
- Download or clone the service discovery client project and build it.
- Copy the built JAR file into the
Add the following task under the
<tasks>element of the
<G-REG_HOME>/repository/conf/registry.xmlfile, to register the service discovery client as a task.
Change the values of the
versionproperties in the above configurations according to your setup.
- Start WSO2 ESB/EI and then start WSO2 G-Reg.
The Terminal, in which you ran WSO2 G-Reg will print the “
# of service created :...” message once the G-Reg server discovers a service from the WSO2 ESB/EI server. These services will be stored under the SOAP Service asset type in WSO2 G-Reg. Also, you can view the WSDLs and XSDs of the services that are imported into WSO2 G-Reg by the client.