Using SQL Anywhere Database with a Web Services Server - Verifying Installation
(Page 3 of 4 )
The web services server (mysorian) hosts the web service. If the web server responds to HTTP requests, it is a sure test that it is installed properly. The verification consists of the following steps:
1. Create a stored procedure. It does not have to be data based.
2. Create a Web Service which calls this stored procedure.
3. Display the web service in a browser.
Creating a stored Procedure
Right clicking the database invokes the Interactive SQL window where you code the stored procedure.

The following stored procedure was coded. The return from this code is a HTML document. If the content type is not set to 'text/html', then your HTML will look screwed up. dbo_sa_set_http_header ('content-type', 'text/html') is a stored procedure only meaningful while responding to HTTP requests. If you were to test it, as it is in Interactive SQL, it would return an error.
Create Procedure pretty2()
Result (html_doc long varchar)
Begin
Call dbo_sa_set_http_header ('Content-type', 'text/html');
Select '<p><font color="red">Welcome to Database Programming</font></p>\n';
End
Next: Creating a Web Service >>
More MS SQL Server Articles
More By Jayaram Krishnaswamy