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 AI Database 26ai, 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.earfile. -
The GeoRaster REST API is packaged in the
sdows.earfile. -
The Geocoder service is packaged in the
geocoder.ear.zipfile. -
The Routing Engine is packaged in the
routeserver.ear.zipfile.
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.earin 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.earpackage 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.
-
-
Preparing the WebLogic Server
You can deploy Spatial Web Services on any Oracle WebLogic Server version that support JDK 8 or JDK 11. -
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 thesdows.earfile. -
Configuring Each Spatial Web Service
Each spatial web service to be used must be configured independently.
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:
-
Install Oracle WebLogic Server version 14.1.1.0.0.
See Installing the Oracle WebLogic Server for installation instructions.
-
Create and configure a WebLogic Domain. Note that it is recommend to create an Administration Server and a Node Manager.
See Creating and Configuring the WebLogic Domain for more information.
-
Perform the following steps on the Oracle WebLogic Server Administration Console.
-
Create and configure a Machine.
-
Create a Managed Server
-
Configure the Machine name on the General tab for the Managed Server’s Configuration.
-
Start the Managed Server.
-
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.
-
Create a folder that will contain the configuration and log files.
-
Create an environment variable
SDOWS_HOMEpointing to the folder created in the preceding step. -
Deploy
<WLS_HOME>/wlserver/common/deployable-libraries/jax-rs-2.0.warto Oracle WebLogic Server as a library. See Install an enterprise application for more information. -
Optionally, set up GDAL (see Setting up GDAL) only if you are deploying WCS or the GeoRaster REST API.
-
Add the WebLogic data source (see Adding a WebLogic Data Source).
-
Optionally, if you are deploying GeoRaster REST API, then set up the necessary environment variables and Oracle Wallet.
-
Deploy
sdows.earas 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.
-
Setting up GDAL
This section describes how to set up GDAL (Geospatial Data Abstraction Library). -
Adding a WebLogic Data Source
You can configure database connectivity in a WebLogic Server by adding JDBC data sources to your WebLogic domain. -
Setting up the GeoRaster REST API
Learn to set up the GeoRaster REST API.
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.
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:
-
JDBC data source name must only contain the characters A-Z, a-z, 0-9. This value will be part of the service URL.
-
JNDI name must have the format
jdbc/<name>, where <name> is the same as JDBC data source name.
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.
-
Configure an Oracle Wallet and add the WebLogic data source connections.
-
Create a new Oracle Wallet using the mkstore tool.
See How to Create an External Password Store for the instructions.
-
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.
-
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.
-
Create a zip file with the Oracle Wallet files and add an environment variable
GEOR_WALLET_FILEpointing to the zipped Oracle Wallet file.Ensure that the
GEOR_WALLET_FILEenvironment variable is available to the WebLogic Server by starting the server from a terminal whereGEOR_WALLET_FILEwas previously setup or by adding the environment variable definition to the WebLogic ServersetDomainEnvscript located on you WebLogic domainbinfolder.
-
-
Configure allowed Cross-Origin Resource Sharing (CORS) for the GeoRaster REST API.
CORS is a browser security mechanism that determines whether client-side JavaScript running in a web browser is permitted to access a REST API hosted on a different origin.
An origin is defined by the combination of protocol (HTTP or HTTPS), domain, and port.
-
Add an environment variable named
GEORASTER_REST_CORS_ALLOWED_ORIGINSand set its value to a comma-separated list of allowed origins.GEORASTER_REST_CORS_ALLOWED_ORIGINS=https://app.example.com,https://admin.example.com:8443As seen in the preceding code, each origin must be specified in one of the following formats:
scheme://hostorscheme://host:port.Do not include URL paths, query strings, fragments, user information, encoded values, or wildcard origins.
-
Ensure that the
GEORASTER_REST_CORS_ALLOWED_ORIGINSenvironment variable is available to the WebLogic Server by adding the environment variable definition to the WebLogic ServersetDomainEnvscript located in your WebLogic domainbinfolder.
-
-
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.
-
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.
-
Ensure that the
GEOR_IMPORT_EXPORT_FOLDERenvironment variable is available to the WebLogic Server by starting the server from a terminal whereGEOR_IMPORT_EXPORT_FOLDERwas previously setup or by adding the environment variable definition to the WebLogic ServersetDomainEnvscript located in your WebLogic domainbinfolder.
-
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.
- Spatial Web Services Administration Console
Oracle Spatial provides a web application to help configure the WFS, WCS, and CSW web service engines.
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: Spatial Web Services Administration Console

Description of the illustration wfs_admin_console.png
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
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.