ZiBaT
=> Peter Levinsky
=> Programming => exercise |
SOAP+Database |
Updated : 2016-09-26
|
To understand and use the MicroSoft cloud solution Azure.
The exercise Create you own SOAP-service part3
and Create you own SOAP-service part4
Create an azure account (you get a code from the teacher) see Create an account on Microsoft Azure
Install the Azure SDK for visual studio see : https://azure.microsoft.com/da-dk/downloads/ ( .Net -> VS2015 ) can take some time
You only have some amount of money so a good advise is to predefine a database and a webservice in the cloud.
Go to the azure http://portal.azure.com
Create a new SQL-database (you will create a server + a database) - Remember your PASSWORD for the database server
To create a database you need a ressource-group for telling where your database server should be hosted - it could be north europe
Create a web-service - again you need to tell a ressource group - it can be the same as for the database.
Now you can use or reuse these two services
In Visual studio - open server explorer - click on the cloud -> SQL databases.
For your database right click and open in SQL-server object browser.
Now you can do as if your database was located on localhost.
I.E. do as in web service part 4 exercise A
In your SQL object browser create a new database e.g. 'SensorDB'.
Create a table to hold Sensor Data i.e. (light, temperature, timestamp).
Add some data rows (i.e right click on table and pick view data, then you can add data)
You can find your connection string like before by open the properties OR you can see the connectionstring in the azure -> your database
Like in web service part 4 exercise B
Create the soap service (see web service part 3 exercise A)
When you far implemented the service you are to publish it in the azure.
Pick your predefined web service -> publish.
You can access your service by <<your-webservice-name>>.azurewebsites.net/service1.svc
Now you can use it as all other soap services you have done - But to put it in WcfTestClient you need to start that program 'by hand'.