WSO2-Data
Services Server provides the feature to expose your data as a
service right away!!!. All you need to give is your database
information and then generate data services to expose your database
tables/schemas as per your need.
If you are using wso2 products for the
first time ...
You need to download
wso2 dataservices server.
Start up the server -> go to
DS_HOME/bin/wso2server.bat | wso2server.sh (DS_HOME is where your set
up is located)
Once the server is up and running open
a web browser and navigate to https://localhost:9443/carbon.
Login it the server using the default
credentials (username=admin, password=admin).
Also note that you need to provide the
related jdbc driver for the database and put in
repository/component/lib in order for this feature to work.
Step 1 :- Create a data source
In order to expose your database you
need to create a data source using wso2 data services server.
To create data source click on
Configure -> Data Sources
Click on add data source and give your
data base information.
Once you create your data source you
can test your connection by giving a validation query (ie Select 1)
to make sure your connection is successful.
Step 2 Generating data services
You can start by clicking on the
generate link in the main menue. Once you click on generate you will
be directed to a wizard which will ask for the datasource and the
database name which will be needed to expose.
Once you create you give your database
name you will get the list of schemas/tables to select for your data
service.
Once you select the tables of your
choice then you need to decide wether you need a single service for
each table or multiple services per table.
Click on next to view the created data
services
Click on finish to view the deployed
services.
You can try your service by clicking on
try this sample for database transactions :) You can also generate
axis2 clients by clicking on the data service.
Try your service
No comments:
Post a Comment