.how to find service URl in wso2 data service - wso2

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

Related

How to pass dynamic Google Cloud API Key to client side from server?

Currently, I am testing Google Cloud's Speech API and wondering how to pass dynamic Google Cloud API key to client app from server.
The speech function will be on client's app (React Native). Before every request to Google Cloud API or session, I am thinking to generate API key dynamically from server side (Nodejs) with a short lifetime and pass to client side. Only then, clients can use the Google service.
The main concern is that I do not want to embed Google Cloud API key on client app and I want to have control on which client can / cannot use the service. Is there a way to dynamically generate API keys on server side with short lifetime and pass to client? Thanks.
Update:
I was checking https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech and found the suggestion:
This Android app uses JSON credential file locally stored in the resources. You should not do this in your production app. Instead, you should set up your own backend server that authenticates app users. The server should delegate API calls from your client app. This way, you can enforce usage quota per user. Alternatively, you should get the access token on the server side, and supply client app with it. The access token will expire in a short while.
This is exactly what I want to do but can anyone suggest how can I achieve this? Thanks.
I am trying to find out how to get the API key for Step 2 on server backend side.
Never store credentials in users' browsers, luckily you are trying to adhere to this principle!
A setup that might be useful here has the following components:
Use an authentication mechanism in your client-side app, by means of an identity provider. You could use Okta, Auth0, Cognito, or any other authentication provider which supports Oauth2.
Use the same authentication provider to secure a custom-build endpoint, which could be a Google Cloud Function. This could be combined with Cloud Endpoints, but not necessarily.
In the same Cloud Function, after a user's identity is checked, you call the speech API.
The API key could be stored as a secret in Google Secret Manager.
The Cloud Function acts as a "serving hatch" to the API, passing back and forth requests from a user to the Google Cloud Speech API.
Your API key remains on the backend, stored as a secret. Users that are not authenticated using the authentication provider, will never have access to the Speech API.

How to provide Service Instance specific Credentials in Cloud Foundry with Service Broker API?

A request to list all service instances to the Cloud Controller API of Cloud Foundry (API Docs) shows a credentials property in the response body.
I know you can provide credentials in service bindings and service keys through the Open Service Broker API, but how do I fill this global credentials object in a service instance?
Imo, this can only happen during Service Provisioning, but all the Service Broker API defines in the response of the provisioning is a dashboard url and an operation.
I looked at a couple of my lab environments, which have a number of different service brokers installed on them. None of them used the field you're asking about.
i.e. cf curl /v2/service_instances. The dictionary resources[].entity.credentials was always empty.
My understanding is that service credentials are associated with a service binding or a service key, not the service itself. If you want to see the service bindings or service keys, you need to use a different API call.
Ex: service binding cf curl /v2/service_instances/<service-instance-guid>/service_bindings. In that output resources[].entity.credentials should be populated with the service information (ie. hostname, port, username, password, etc...; whatever is provided by the service).
Similarly, service key credentials would be under the API cf curl /v2/service_instances/<service-instance-guid>/service_keys.
Maybe someone else can come along and tell us the purpose of this global field, but at the time of me writing this it appears to be unused.
Hope that helps!

How to Authenticate an External Publisher in Google Pub/Sub?

I am trying to obtain data from a web service (publisher).
The web service lets me send the data (message) to any url through a webhook. My plan is to send it to a Google Pub/Sub topic.
However, Google Pub/Sub is not recognizing this third-party web service. It is returning a http 401 response code, meaning that the web service is not authenticated.
My question is, How can I authenticate it?
Authentication for requests made to Google Cloud Pub/Sub or any other of the Google Cloud Platform services can be accomplished in a couple of different ways. In your case, where you want to make a direct request via the REST API, you'll need to create a service account and authenticate via OAuth 2.0. The Using OAuth 2.0 for Server to Server Applications guide details the process. If the web service you are using supports OAuth 2.0 authentication for requests it makes, then you should basically be set. If it does not, then you will have to take care of acquiring access tokens (and acquiring new ones when they expire) manually.

How to discover axis2 web service with WSO2 Governance Registry?

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.

matching API with data services in WSo2

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