ASA Database Administration Guide
Using the Built-in Web Server
When you want a database server to listen for HTTP or HTTPS requests, you must specify which types of web requests it is to listen for on the command line. By default, database servers do not listen for web requests and there is no way for clients to access the services that may be defined in your database.
You can also specify various properties of the services, such as on which port they are to listen. Doing so permits a the database server to act as a web server. It allows some or all database users to access web services that have been defined within the databases.
You do not need to open a port for SOAP services. Unlike HTTP and HTTPS services, SOAP services become available the moment you create them. No additional command-line switches are required.
You must also create web services within the database for clients. For more information, see Creating web services.
You use the -xs command-line switch to enable web services. Optional additional parameters to this switch let you customize access to each type of service.
The general syntax of the switch is as follows
-xs protocol [ (option=value, ...) ]
The following protocol values are available:
http Listen for HTTP connections.
https Listen for HTTPS connections.
all Start listening for web requests on both HTTP and HTTPS ports.
none Do not listen for web service requests. This setting is the default.
The following are some of the options that are available:
ServerPort [PORT] The port on which to listen for web requests. By default, Adaptive Server Anywhere listens on port 80 for HTTP requests and on port 443 for secure HTTP (HTTPS) requests.
For example, if you already have a web server running on port 80, you could use the following options to start the a database server that listens for web requests on port 8080:
dbeng9 web.db -xs http(port=8080)
DatabaseName [DBN] Specifies the name of a database to use when processing web requests, or uses the REQUIRED or AUTO keyword to specify whether database names are required as part of the URI.
If this parameter is set to REQUIRED, the URI must specify the database name.
If this parameter is set to AUTO, the URI may specify a database name, but does not need to do so. If the URI contains no database name, the default database on the server is used to process web requests.
If this parameter is set to the name of a database, that database is used to process all web requests. The URI must not contain a database name.
LocalOnly [LOCAL] When set to YES, this parameter causes the database server to reject all connections from clients running on the same machine. The default value is NO, which means accept from clients no matter where they are located.
LogFile [LOG] The name of the file to which the database server is to write information about web requests.
LogFormat [LF] Controls the format of messages written to the log file and which fields appear in them. If they appear in the string, current values are substituted for the codes, such as @T, when each message is written.
The default value is @T - @W - @I - @P - "@M @U @V" - @R - @L - @E, which produces messages such as the following:
06/15 01:30:08.114 - 0.686 - 127.0.0.1 - 80 - "GET /web/show_table HTTP/1.1" - 200 OK - 55133 -
LogOptions [LOPT] Allows you specify keyword and error numbers that control which messages, or types of messages, are written to the log file.
For a complete list of the available options and detailed information about them, see Network communications parameters.