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.
Parent topic: Web Coverage Service (WCS) Support
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:
-
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();
-
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');
-
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');
Parent topic: Setting Up WCS Using WebLogic Server
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.
Parent topic: Setting Up WCS Using WebLogic Server
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.)
- To know if you have the necessary GDAL drivers, execute the following GDAL
command:
<GDAL_HOME>/bin/gdalinfo --formats
- 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 ServersetDomainEnv
script located in your WebLogic domainbin
folder. - Copy
gdal.jar
(located in thegdal/lib
directory) to the WebLogic Server domain'slib
directory and restart the server. - Configure the GDAL database connection parameters using the Service Configuration tab of the WCS Administration Console.
- Optionally, specify creation options (
CreationOption
) to GDAL in a GetCoverage Operation (WCS) request.
Parent topic: Setting Up WCS Using WebLogic Server