11.3 Deploying and Configuring Spatial Web Services

This topic describes actions that apply to deploying and configuring Oracle Spatial Web Services, and particularly WFS, WCS, CSW, and GeoRaster REST API.

These services are implemented as Java web applications and can be deployed to run on WebLogic 12.1.3 or later. The required Java version is JDK 8 or later.

Note:

Effective with Oracle Database Release 23ai, the Oracle Spatial Java APIs are compiled with JDK 11 as the OJVM in the database supports JDK11. However, the APIs will continue to be supported on JDK8 for backwards compatibility. When using the API, ensure that all the related JAR files are consistent with the JDK version (JDK 8 or JDK 11) that is being used. See RDBMS and JDK Version Compatibility for Oracle JDBC Drivers for more information on the JDBC drivers that are supported for the different JDK versions.
  • WFS, WCS, and CSW are packaged in the sdows.ear file.
  • The GeoRaster REST API is packaged in the sdows.ear file.
  • The Geocoder service is packaged in the geocoder.ear.zip file.
  • The Routing Engine is packaged in the routeserver.ear.zip file.

Geocoder and routing files can be found under the directory $ORACLE_HOME/md/jlib of your Oracle installation. In addition to the “general” instructions in this topic, refer to the respective chapters for each specific spatial web service that you plan to use for any additional deployment and configuration tasks.

WFS, WCS, CSW and GeoRaster REST API (sdows.ear) can be installed in the following ways:

  • You can install Oracle Spatial Web Services application from Oracle Cloud Marketplace. This will install and configure sdows.ear in an Apache Tomcat Web Server instance and GDAL on a new Oracle Cloud Infrastructure Compute under your Oracle Cloud Account. Once you complete the installation, you can continue to configure your spatial web service. Refer to Configuring Each Spatial Web Service for more information.
  • On a WebLogic Server on your own Linux or Windows machine, you can deploy the sdows.ear package available in either one of the following two places:
    • Inside you Oracle Home Installation, under the directory:
      $ORACLE_HOME/md/jlib.
    • On My Oracle Support using the Doc Id 3019446.1.

    Once you have the deployment package, you can then continue to Preparing the WebLogic Server.

11.3.1 Preparing the WebLogic Server

You can deploy Spatial Web Services on any Oracle WebLogic Server version that support JDK 8 or JDK 11.

However, it is recommended to use Oracle WebLogic Server version 14.1.1.0.0.

You can prepare the WebLogic environment by performing the following steps:

  1. Install Oracle WebLogic Server version 14.1.1.0.0.
    See Installing the Oracle WebLogic Server for installation instructions.
  2. Create and configure a WebLogic Domain. Note that it is recommend to create an Administration Server and a Node Manager.
  3. Start the Node Manager and also Start the WebLogic Server.
  4. Perform the following steps on the Oracle WebLogic Server Administration Console.
    1. Create and configure a Machine.
    2. Create a Managed Server
    3. Configure the Machine name on the General tab for the Managed Server's Configuration.
    4. Start the Managed Server.

11.3.2 Deploying Spatial Web Services in WebLogic Server

This section describes how to deploy the services (such as WFS, WCS, CSW, and GeoRaster REST API) included in the sdows.ear file.

For any other web services, follow the instructions in their respective chapters.

Also, note that if you want to configure WCS or GeoRaster REST API, then you need to setup GDAL prior to the deployment of sdows.ear file. If you are only interested in WFS or CSW, then you can skip the Setting up GDAL section.

To deploy sdows.ear file in the WebLogic Server, perform the following steps.

  1. Create a folder that will contain the configuration and log files.
  2. Create an environment variable SDOWS_HOME pointing to the folder created in the preceding step.
  3. Deploy <WLS_HOME>/wlserver/common/deployable-libraries/jax-rs-2.0.war to Oracle WebLogic Server as a library. See Install an enterprise application for more information.
  4. Optionally, set up GDAL (see Setting up GDAL) only if you are deploying WCS or the GeoRaster REST API.
  5. Add the WebLogic data source (see Adding a WebLogic Data Source).
  6. Optionally, if you are deploying GeoRaster REST API, then set up the necessary environment variables and Oracle Wallet.
  7. Deploy sdows.ear as an application (see Install an enterprise application).

After completing the necessary steps for a spatial web service, check the Deployments page to ensure that the application is in the Active state. If it is in the Prepared state, then click Start to start the application. See Start and stop a deployed enterprise application for instructions.

11.3.2.1 Setting up GDAL

This section describes how to set up GDAL (Geospatial Data Abstraction Library).

You can download GDAL from My Oracle Support using the Patch ID listed in MOS note 2997919.1.

There are two GDAL zip files, one for Linux 64 operating system and the other for Windows 64 operating system.

The README.txt file inside the GDAL zip file contains the instructions to setup GDAL.

Ensure that GDAL is available to the running Oracle WebLogic Server by starting the server from a terminal where GDAL is set up or by invoking the gdal_setup script from the WebLogic server setDomainEnv script located in your WebLogic domain bin folder.

11.3.2.2 Adding a WebLogic Data Source

You can configure database connectivity in a WebLogic Server by adding JDBC data sources to your WebLogic domain.

You can create a generic data source by following the instructions provided in Create JDBC generic data sources.

However, you must consider the following aspects while choosing values during data source configuration:

  1. JDBC data source name must only contain the characters A-Z, a-z, 0-9. This value will be part of the service URL.
  2. JNDI name must have the format jdbc/<name>, where <name> is the same as JDBC data source name.

11.3.2.3 Setting up the GeoRaster REST API

Learn to set up the GeoRaster REST API.

To set up the GeoRaster REST API in the WebLogic Server, perform the following steps.

  1. Configure an Oracle Wallet and add the WebLogic data source connections.
    1. Create a new Oracle Wallet using the mkstore tool.
      See How to Create an External Password Store for the instructions.
    2. Store the credentials and connection string to the Oracle Wallet using a TNS Alias.
      See Using a TNS Alias instead of a DB Connect String for the instructions to add a TNS Alias to an Oracle Wallet.

      Add as many database connections to the Oracle Wallet as you need.

    3. Add a WebLogic data source using as JDBC data source name, the alias defined in the Oracle Wallet and JNDI name in the format jdbc/<alias> where <alias> is the alias defined in the Oracle Wallet.
      See Defining a WebLogic Server Data Source using the Wallet for instructions to define the WebLogic data source using the Oracle Wallet.
    4. Create a zip file with the Oracle Wallet files and add an environment variable GEOR_WALLET_FILE pointing to the zipped Oracle Wallet file.
      Ensure that the GEOR_WALLET_FILE environment variable is available to the WebLogic Server by starting the server from a terminal where GEOR_WALLET_FILE was previously setup or by adding the environment variable definition to the WebLogic Server setDomainEnv script located on you WebLogic domain bin folder.
  2. Optionally, setup a folder for raster Import/Export temporary storage.

    This optional step is required only if you want to import and export raster files using the REST API.

    1. Add an environment variable with name GEOR_IMPORT_EXPORT_FOLDER and the value points to a folder that will be used as a temporary storage for import and export functionality.
    2. Ensure that the GEOR_IMPORT_EXPORT_FOLDER environment variable is available to the WebLogic Server by starting the server from a terminal where GEOR_IMPORT_EXPORT_FOLDER was previously setup or by adding the environment variable definition to the WebLogic Server setDomainEnv script located in your WebLogic domain bin folder.

11.3.3 Configuring Each Spatial Web Service

Each spatial web service to be used must be configured independently.

You must perform specific tasks that depend on which web services you will be supporting for use in your environment. You will probably need to create and grant privileges to database users. You may need to download and load special data (such as for geocoding), modify configuration files, or create data sources in WebLogic Server.

11.3.3.1 Spatial Web Services Administration Console

Oracle Spatial provides a web application to help configure the WFS, WCS, and CSW web service engines.

The following figure shows the user interface for the Oracle Spatial Web Services Administration Console:

Figure 11-1 Spatial Web Services Administration Console

Description of Figure 11-1 follows
Description of "Figure 11-1 Spatial Web Services Administration Console "

The user interface for the administration console comprises the following pages:

  • Publish Features: To add and remove the data that is included for each service
  • Test: To test the request and response of each service
  • Log: To display and download log file content for diagnosis
  • Service Configuration: To configure each service

Use the following URL to launch the administration console in your browser.

http://<system-name>:<port>/oraclespatial/

As seen in the preceding figure, to login to the application, you can either provide the User Name and Password credentials for authentication or you can click the Test service as guest link which opens the test page. The test page allows you to create the OGC requests by showing all available service operation requests. Note that except the test page all other pages require you to be authenticated.

You can use the user menu on the top right of the page to Login or Log out. All users are configured in the Oracle WebLogic Server where the administration console is deployed.

The Services menu services_menu is located on the top left of the page.

The Services menu options are as follows:

  • Web Feature Service
  • Web Coverage Service
  • Catalog service for the Web

You can click on any one of the service options to view all the available tabs for the selected service in the main page.

Select a configured data source from the Data Source drop-down on the top right of the page for the selected service. You can change the selected data source at any time. Multiple data sources can be configured in WebLogic server to access data from different schemas or databases.

The Service Configuration tab allows you to modify service parameters like logging level or service provider information displayed in the GetCapabilities response.

The Test tab allows you to create simple requests for different operations. You can edit, add, or modify parameters, and then send as HTTP POST/XML request. The responses are also displayed.

The Log tab displays the content of the log files to diagnose problems. You can download logs compressed in a zip file which you can use later to diagnose problems.