Skip to end of metadata
Go to start of metadata

WSO2 Governance Registry has the capability to discover the services via ws-discovery and store the discovered services and related metadata. If you have set up WSO2 Governance Registry as a remote governance registry for your application, you have the option of configuring your server to use the governance registry as a WS-Discovery proxy. Any WS-Discovery compliant web services hosting server (E.g.: Axis2/JAX-WS/JAX-RS) can be configured to use Governance Registry as a WS-Discovery proxy, which would discover any deployed services for governing purposes such as LifeCycle Management.

The following instructions explain how to discover JAX-WS/JAX-RS web services in WSO2 Application Server using WS-Discovery in the WSO2 Governance Registry:

  1. Add the following property to the axis2.xml file of WSO2 AS to configure WSO2 Governance Registry (GReg) to work as a WS-Discovery proxy. In this example, the value of the parameter is the endpoint of the "DiscoveryProxy" service, which is deployed in Governance Registry to discover services. 

    <parameter name="DiscoveryProxy">https://localhost:9443/services/DiscoveryProxy</parameter>
  2. If required, you can define scopes and the metadata version as a <context-param> in the WEB-INF/web.xml. If the scopes and metadata version are not defined, the default version will be effective.
    • The following configuration adds the http://wso2.com/as scope:

    • The following configuration adds the metadata version:

  3. Start the two products (WSO2 Governance Registry and WSO2 Application Server) following the instructions in Running the Product

    Note that you must add a port offset in the <PRODUCT_HOME>/repository/conf/carbon.xml file to ensure that both products are not using the same port.

  4. Log in to the management console of WSO2 AS and add a JAX-WS service (E.g. java_first_jaxws.war). The service would be displayed on the service list.  
  5. Now, log in to the management console of WSO2 Governance Registry and go to the Services menu. The service list will display the services that were deployed in Application Server.

    The name of this service will be shown as the web application name followed by the name of service available in the web application. For example, if java_first_jaxws.war has a service called hello_world, then the service will be listed as java_first_jaxws_hello_world.

This means that Governance Registry has discovered all the web services deployed in Application Server and stored them in Governance Registry. Now these service endpoints can be used from Governance Registry for various purposes.

  • No labels