Webservices IQ
- PAGE UNDER CONSTRUCTION **
One of the really cool features of Sybase IQ is the ease of use of WebServices. Strictly spoken it is not really something specific for Sybase IQ, but more of Sybase Anywhere, the catalog store for IQ.
This page describes how to install and use it.
Configure IQ
Add an extra line to the cfg file for IQ to start up an http listener.
-xs http{port=8080}
The port number 8080 is just as an example.
Then stop/start IQ to activate the listener.
To activate a webservice, for instance from your browser, you need to define a service in IQ. For instance a URL http://prd-syb-iq-1:8080/my_service expects a service in IQ called my_service. The name "root" is the default so http://prd-syb-iq1:8080 will activate a service called root.
Create services
Create a service with for instance dbisql. Sybase Central does not support services.
Log on as DBA or with an account with DBA permission.
create service root type 'html' as call sp_iqcontext()
You can only define a single statement in a service, so this will usually be a stored procedure.
The html type of service allows you create a resultset that's automatically formatted by IQ. In this example the sp_iqcontext stored procedure selects some data, and IQ will then automatically format it for you. You can already activate this service now by activating the URL http://prd-syb-iq1. You will get a screen for a username/password, enter a valid IQ login here.
Create an advanced webpage
To create a more advanced webpage you should do your own html formatting. Use a service with type "raw" for this.
create service test_service type 'raw' as call sp_test()