3

I am trying to access the registry of WSO2 BPS and WSO2 ESB from Java in order to automatically fill the registry based on the data I provide.

I have already found a number of resources about the required Java code and dependencies, this being the most helpful one: [WSO2 Governance Registry]Using WSRegistryServiceClient. However, the approach described in these resources depends on the WSRegistryService service. This service is included in Governance Registry by default, but not in the other WSO2 products. I have verified that my code works for the Governance Registry. For any other WSO2 product on my machine, I get this error:

The service cannot be found for the endpoint reference (EPR) https://localhost:9445/services/WSRegistryService

I found an old thread suggesting that it should be possible to install the WSRegistryService on other WSO2 products as well, but I have not been able to find out how to do so. I can't seem to find it within the features I can install from the web console of the products. I have also tried manually copying the relevant jar from the plugins directory of Governance Registry into the plugins directory of other products, but that doesn't seem to be sufficient.

Note that my application for filling the registry will not be running on the carbon server whose registry I want to access, so using CarbonContext.getThreadLocalCarbonContext() (an approach I found in some other articles) is not an option.

Community
  • 1
  • 1
curledUpSheep
  • 403
  • 3
  • 11
  • Look at http://stackoverflow.com/questions/25688923/modifying-config-registry-resource-content-during-mediation-in-wso2-esb – Jean-Michel May 03 '16 at 13:34
  • Accessing the registry from a mediator could be a solution for the ESB, but I don't see how I can use this approach to interact with the BPS registry. The nice thing about the WSRegistryService approach would be that I could use it to interact with any WSO2 product's registry, provided it has the WSRegistryService installed. – curledUpSheep May 03 '16 at 14:14

1 Answers1

1

I think your referring to how to install features to WSO2 products,

Please find this documentation.

tk_
  • 16,415
  • 8
  • 80
  • 90
  • Hi thusharaK. I have already tried that approach, but I can't find which feature I need to install. This is what I meant when I said "I can't seem to find it within the features I can install from the web console of the products". The repository I'm using is the Carbon 4.4.0 repo located at http://product-dist.wso2.com/p2/carbon/releases/wilkes/. – curledUpSheep May 04 '16 at 12:27
  • Apparently you need to install carbon-registry features (http://product-dist.wso2.com/p2/carbon/releases/wilkes/) – tk_ May 04 '16 at 17:41
  • 1
    Thank you. It seems that I had overlooked the feature. For anyone else looking for the same thing: you need to add the repository linked above, uncheck "Group features by category" and look for the feature Registry WS API. If you get "Cannot complete the install because of a conflicting dependency." upon installing, try another version (I had to take version 4.4.9 for ESB 4.9.0). – curledUpSheep May 04 '16 at 18:27
  • Yes, Better remove all the ticks and find the specific version. You can always use the search functionality which is available in Available Features tab. – tk_ May 04 '16 at 18:33