How to discover axis2 web service with WSO2 Governance Registry? - wso2

My question if is it possible to discover or integrate axis2 web services with WSO2 Governance Registry?
I want to discover all the web services and automatically upload their info to the WSO2 GREG, and check automatically if there is a new web services.

Yes you can do this with WSO2 Greg and Application server. Here are the steps you required.
In jenkins(or any other task scheduler to check available services frequentrly) we will deployed scheduled task to trigger some event periodically.
Periodic task will call WSO2 App Server’s admin services to get service metadata. To list service meta data for axis2 services we can call service admin soap service (https://127.0.0.1:9443/services/ServiceAdmin?wsdl)
In same way we can call all services and get complete service data(if you need other service types in addition to axis2 services).
Then we can call registry rest API and push that information.
Please refer this article for more information about Registry REST API.
You can find detailed description and soap service details in this article.

Related

how to set one server for wso2 analytics and one sever for wso2 api manager

I want to have a server that visualize api data from my wso2 api manager
can anyone help me pls?
Thanx
`enter code here`
You can deploy the WSO2 API Manager in a single server and the Analytics in another server and configure both API Manager and Analytics TOML/Yaml configurations to communicate and send data.
Follow the Standard Setup steps provided in WSO2 API Manager Docs for more detailed steps and configurations.

WSO2 API manager - how does publishing API works technically?

WSO2 Documentation is not clear on how does the publishing of new API works.
Is is the publisher that pushes new API to the gateways ?
or
Is is the gateways that pulls or call new API configurations from the Manager ?
or
It is done through the database ?
And which protocol and ports does is uses ? An API Call, thrift, binairy ?
Thanks
There are 2 things happening when you publish an API.
1) Persist API metadata in the database. Both the API Publisher and the API store pull these data from the database to display APIs.
2) Runtime artifact (i.e. Synapse file) is deployed in the gateway. This is done via a SOAP web service call. The API Publisher calls a SOAP web service exposed in the gateway for this.
Hope I answered your question.

wso2 Greg - Service Registry and Discover with Rest

I have all wso2 products, but I don't understand how I can use Governance Registry in conjunction with rest webservices.
For example: I published a Rest Webservice in Governance, and now I want to use the service discovery to get the endpoint for this Webservice.
It's possible to do this with wso2 products?
Thanks
With WSO2 Governance Registry, you can discover endpoint details in three different ways: As example, if you are using WSO2 ESB(integration scenarios for Governance)
Share Registry space with both ESB and G-Reg
Use G-Reg to push artifacts into ESB node
ESB pull artifact from the G-Reg
Since you have already created a Rest Service in the G-Reg side, you can retrieve Endpoint details using Governance Rest API. It has an inbuilt functionality to retrieve Endpoint associated with a given RestService instance. You can find more details from this doc.

.how to find service URl in wso2 data service

I created a data service using below url
Data Service
anyway i need to know how to find my service url ?
When you successfully create a Data Service, it will be listed under services.
Look at the final step in the same doc you have referred.
Access the WSDLs and see whether your operations are defined properly.
You should be able to see the service endpoint url in the WSDL.
You can just invoke the web service from your own client. You can also try soapUI as a testing tool.
Go to the Service Dashboard and there you can find the service Endpoints. To view the Service Dashboard of a service, just click on the dataservice you created which is available in the services list.
Refer http://docs.wso2.org/display/DSS301/Service+Dashboard

Writing tenant aware web service in wso2 application server

I am trying to develop a axis2 web service to be deployed on WSO2 Application Server 5.0.1. Currently we have requirement, that web services support multi-tenancy and in some web services some process based on tenant. Upon the service context i need to retrieve tenant information from the current request. Currently i create to tenant in my local environment using Application Server management console test1.com and test2.com. How can i retrieve domain name and if possible tenant id of test1.com and test2.com from request and how should client call the web service to a specific tenant, for example to test1.com ?
Thanks
You can use CarbonContext to retrieve current tenant and other stuffs.
CarbonContext cCtx = CarbonContext.getCurrentContext();
cCtx.getTenantDomain();
cCtx.getTenantId();
Refer this article for more information on how to use carbon platform APIs.