How to Browse the SAP Sybase IQ HTTP Web Server

Available URL names are defined by how your web services are named and designed. Each web service provides its own set of web content. This content is typically generated by custom functions and procedures in your database, but content can also be generated with a URL that specifies a SQL statement.

lternatively, or in conjunction, you can define the root web service, which processes all HTTP requests that are not processed by a dedicated service. The root web service would typically inspect the request URL and headers to determine how to process the request.

URLs uniquely specify resources such as html content available through HTTP or secured HTTPS requests. This section explains how to format the URL syntax in your web browser so that you can access the web services defined on your SAP Sybase IQ HTTP web server.

Note: The information in this section applies to HTTP web servers that use general HTTP web service types, such as RAW, XML, and HTML, and DISH services. You cannot use a browser to issue SOAP requests. JSON services return result sets for consumption by web service applications using AJAX.

Syntax

{http|https}://host-name[:port-number][/dbn]/service-name[/path-name|?url-query]

Parameters

Remarks

The web browser prompts for user name and password when required to connect to the server. The browser then base64 encodes the user input within an Authorization request header and resends the request.

If your web service URL clause is set to ON or ELEMENTS, the URL syntax properties of path-name and url-query can be used simultaneously so that the web service is accessible using one of several different formatting options. When using these syntax properties simultaneously, the path-name format must be used first followed by the url-query format.

In the following example, this SQL statement creates a web service where the URL clause is set to ON, which defines the url variable:

CREATE SERVICE ShowSalesOrderDetail
    TYPE 'HTML'
    URL ON
    AUTHORIZATION OFF
    USER DBA 
    AS CALL ShowSalesOrderDetail( :product_id, :url );

The following is a sample list of acceptable URLs that assign a url value of 101 and a product_id value of 300:

When a host variable name is assigned more than once in the context of path-name and url-query, the last assignment always takes precedence. For example, the following sample URLs assign a url value of 101 and a product_id value of 300:

Example

The following URL syntax is used to access a web service named gallery_image that is running in a database named demo on a local HTTP server through the default port, assuming that the gallery_image service is defined with URL ON:

http://localhost/demo/gallery_image/sunset.jpg

The URL appears to request a graphic file in a directory from a traditional web server, but it accesses the gallery_image service with sunset.jpg specified as an input parameter for an HTTP web server.

The following SQL statement illustrates how the gallery service could be defined on the HTTP server to accomplish this behavior:

CREATE SERVICE gallery_image
    TYPE 'RAW'
    URL ON
    AUTHORIZATION OFF
    USER DBA 
    AS CALL gallery_image ( :url );

The gallery_image service calls a procedure with the same name, passing the client-supplied URL. For a sample implementation of a gallery_image procedure that can be accessed by this web service definitions, see %ALLUSERSPROFILE%\SybaseIQ\samples\SQLAnywhere\HTTP\gallery.sql.