17.5 Setting Up WCS Using WebLogic Server

For setting up WCS, Oracle WebLogic Server (WLS) 12.1.3 or later is required.

This topic uses an example that assumes the following:

  • A user schema SCOTT has a table named IMAGE, defined as:

    CREATE TABLE IMAGE (
       id NUMBER PRIMARY KEY,
       name VARCHAR2(32),
       raster MDSYS.SDO_GEORASTER);
    
  • The WCS schema is named WCS_USER.

Setting up the WCS server involves deploying the sdows.ear file into WebLogic Server (explained in Deploying and Configuring Spatial Web Services), as well as the following actions.

17.5.1 Configuring the Database Schemas

Note:

If you plan to use the same Oracle Database schema both to store GeoRaster objects and to access them through WCS, skip this section and go to Setting Up WCS Data Sources.

To configure the Oracle Database schemas, follow these steps:

  1. Create metadata tables. To do so, use SQL*Plus to connect to Oracle Database as the user that you want to be the WCS user (in this example, a user named WCS_USER), and enter the following:

    CALL SDO_WCS.init();
  2. Connect as the database user (in this example, SCOTT, which owns a GeoRaster table named IMAGE) that stores GeoRaster objects.

    connect scott/<password-for-scott>
    CALL SDO_WCS.createTempTable();
    CALL SDO_WCS.grantPrivilegesToWCS('IMAGE','WCS_USER');
  3. Connect as the WCS user (in this example, WCS_USER), and publish the GeoRaster images from a user table containing the desired GeoRaster objects (for example, from the RASTER column in the SCOTT.IMAGES table).

    connect wcs_user/<password-for-wcs_user>
    CALL SDO_WCS.publishCoverage('SCOTT','IMAGE','RASTER');

17.5.2 Setting Up WCS Data Sources

Each database can have multiple WCS schemas, each of which corresponds to one data source in WebLogic. You can also have multiple data sources configured for WCS in WebLogic server. Each data source can be accessed through a different URL, where the last part of the URL corresponds to the data source name configured in WebLogic Server.

The following is an example link with a WLS data source named wcsdata1:

http://localhost:80/oraclespatial/wcs/wcsdata1?service=WCS& version=2.0.1&request=GetCapabilities

You can configure a WCS data source by following the steps explained in Adding a WebLogic Data Source.

17.5.3 Configuring GDAL for the WCS Server

The Oracle WCS implementation can generate any GDAL supported format. You must configure a GDAL instance on the same system as WebLogic Server. The GDAL VRT driver and the GDAL Oracle GeoRaster driver are needed to communicate with the WCS server. (To get GDAL, you can download it from http://www.gdal.org, you can get its Linux and Windows versions from your Oracle Database installation as described in Oracle Spatial GeoRaster Developer's Guide, or you can download it from My Oracle Support using the Patch ID listed in MOS note 2997919.1.)

  1. To know if you have the necessary GDAL drivers, execute the following GDAL command:
    <GDAL_HOME>/bin/gdalinfo --formats
  2. Ensure GDAL is available to the running Oracle WebLogic Server by starting the server from a terminal where GDAL is setup or by invoking the gdal_setup script from the WebLogic Server setDomainEnv script located in your WebLogic domain bin folder.
  3. Copy gdal.jar (located in the gdal/lib directory) to the WebLogic Server domain's lib directory and restart the server.
  4. Configure the GDAL database connection parameters using the Service Configuration tab of the WCS Administration Console.
  5. Optionally, specify creation options (CreationOption) to GDAL in a GetCoverage Operation (WCS) request.