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.
Related
I am new to API gateways and am trying to understand how they work. I am using WSo2 but figured they all probably work on same fundamentals.
I have a backend API written in SOAP which works fine.
I created a WSo2 API that connects to my backend SOAP API through swagger and works fine.
I also ran Wso2 endpoint from SOAP ui and got my response.
Next step is to create a client that will invoke WSo2 API and will eventually hit the backend SOAP API and get a response back. Should I use SOAP Backend API WSDL to create java objects while writing client for WSO2 API I created in step 2?
So:
wso2 client -> wso2 API -> backend SOAP API
and I create backend SOAP API WSDL to create java objects for wso2 client?
Usually, for REST APIs the gateways expose OAS documents and you can use those to generate REST API clients.
However, in case of SOAP APIS, the gateways mostly work in passthrough manner. In that case, if you want to generate a client you can use the backend WSDL.
Many third-party services providers allow you to configure a "Webhook" (aka HTTP POST) to your system when an event occurs in their system. Service providers will use various methods of authentication (HMAC, OAuth, TLS, etc.).
For example, Company1 configures ServiceABC to send notification to http://company1.com/eventlistener when an event occurs in the service provider (eg transaction approved):
ServiceABC.com -> HTTP POST -> http://company1.com/eventlistener
http://company1.com/eventlistener is in the DMZ. It will authenticate the message and forward to back end service as appropriate.
[DMZ] http://company1.com/eventlistener -> | [Behind] http://backendUrl/service
In this example, assume the service provider does not support OAuth. Authentication is performed using a custom header scheme.
Can/Should the WSO2 API Manager be used in this scenario?
If not the API Manager, can the WSO2 ESB be used ?
API Manager is the right solution here. API Manager has 5 main components, gateway, publisher, store, keymanager and traffic manager. In the basic distributed setup these 5 components can run on 5 machines. API Publisher publishes APIs to gateway (real artifact of API are here) and store (virtual representation of API, to which can be subscribed, are here). Gateway exposes your APIs to outside. So it resides in DMZ. API Store also can be on DMZ depending on what you want. Keymanager handles authentication (eg. OAuth2) and should be in MZ. Traffic manager is used for request throttling.
Backend authentication can be done with a simple customization.
You can find clustering documentation here. APIM deployment patterns are here.
Hope this helps.
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.
I was thinking of using my own custom api gateway running on a separate box using nginx.
Is there any way in which the WSO2 API Manager can integrate to my api gateway?
In case there isn't, wanted to know if there's the possibility to run WSO2 API Manager without (or disabling) the API Gateway and if you could tell me which WSO2 API Manager's features would be unavailable.
Currently there's no way of replacing the gateway since we do the authentication, throttling, etc using synapse handlers. Here I am not sure about your use case of using nginx but what you can do is you can use nginx endpoint when you create the API or on the other way around you can route nginx traffic to API Gateway (you need to fix the API endpoints appearing in the API manager store view to point to nginx). Basically API layer need to be on top of service layer.
I 'm looking for a tool to host and publish APIs documentation so
that users of the api can browse it and test it right from the
documentation web page
If i got it correctly, you need a API store only to host your APIs.You can try enterprise store The documentation can be found here
I have created a data service in WSo2 for exposing a table. I have also created an API for this, Now I wanted to match the API with this data service.
Please help how to do this.
Have you created the API in the ESB? You can create the API in the DSS itself[1] while creating the data service[1][2]. If you want to expose the datasservice via an ESB then the service endpoint of the created dataservice is available in the dataservice dashboard page which can be directly accessed by the ESB.
[1]https://docs.wso2.com/display/DSS321/Defining+Service+Operations
[2]https://docs.wso2.com/display/DSS321/Exposing+Data+as+REST+Resources