Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial demonstrates how to integrate an external WSO2 API Manager (APIM) with WSO2 G-Reg. 

...

WSO2 G-Reg implements Services (SOAP or REST) as configurable governance artifacts (RXT files)which you create using the G-Reg Publisher. Usually, you publish a service in WSO2 APIM using the APIM Publisher web interface. Instead, you can integrate WSO2 APIM with WSO2 G-Reg, to directly publish APIs to APIM Publisher using the services deployed in the WSO2 G-Reg. This guide explains how to configure the two products to expose services in the G-Reg as APIs in WSO2 APIM.

Prerequisites

Follow the steps below to set up the required prerequisites before starting the integration.

...

Expand
titleConfiguring to publish multiple (SOAP and REST) service types

 If you have already published a SOAP service and if you want to publish a REST service (or vice versa) in the same G-Reg server, you need to create a new lifecycle and assign the corresponding executor to the artifact type. Follow the steps below to do this.

  1. Log in to the G-Reg Management Console using the following URL and admin/admin credentials:  https://10.100.5.72:9444/carbon
  2. Click Extensions, and then click Lifecycles.
  3. Click the corresponding View/Edit Link of the ServiceLifeCycle.
  4. Copy the configuration in the editor, and click Cancel.
  5. Click Add New Lifecycle.
  6. Paste the configuration you copied in the editor.
  7. Replace the configuration of the executor accordingly as per step 4 in the Configuring WSO2 G-Reg section above.
  8. Change the name of the lifecycle as shown in the example below.
    <aspect name="NewServiceLifeCycle" class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle">
  9. Click Save, and then click Artifact Types in the left navigation menu.
  10. Click the View/Edit link of the Artifact Type to which you need to assign the new lifecycle with the corresponding executor (i.e. soapservice or restservice)
  11. Enter the name of the new lifecycle in the configuration as shown in the example below.
    <lifecycle>NewServiceLifeCycle</lifecycle>
  12. Click Save.

...

Setting up the service in WSO2 G-Reg

Create Follow the steps below to create/edit and publish the service in WSO2 G-Reg, which you need to publish to WSO2 APIM. For instructions, see Adding and Deleting Assets. (You can also edit an existing service to publish it to WSO2 APIM.)

  1. Create the service, which you need to publish to WSO2 APIM in WSO2 G-Reg or edit it if it is an existing one. 

    Tip

    When creating the service or editing an

...

  1. existing service, add the same values that you provided for the apim.endpoint parameter (e.g. http://localhost:9763/), and apim.env parameter (e.g. "dev") in the lifecycle executor in Integrating with an External WSO2 API Manager, for Environments and URL in the Endpoints tab as shown in the example below.  

    define the endpointImage Modified

...

  1. Publish the

...

  1.  service you created or edited to

...

  1. WSO2 APIM Publisher. For instructions,

...

  1. see Managing Life Cycles of Assets.

Testing the API Published in WSO2 APIM 

...