10Introduction to Spatial Web Services

This chapter introduces the Oracle Spatial support for spatial Web services. A Web service enables developers of Oracle Spatial applications to provide feature data and metadata to their application users over the Web.

This chapter contains the following major sections:

Note:

If you are using Spatial Web Feature Service (WFS) or Catalog Services for the Web (CSW) support, and if you have data from a previous release that was indexed using one or more SYS.XMLTABLEINDEX indexes, you must drop the associated indexes before the upgrade and re-create the indexes after the upgrade.

10.1 Types of Spatial Web Services

Geocoding, which enables users to associate spatial locations (longitude and latitude coordinates) with postal addresses. Geocoding support is explained in Chapter 11.

Yellow Pages, which enables users to find businesses by name or category based on their relationship to a location. Yellow Pages support is explained in Chapter 12.

Routing, which provides driving information and instructions for individual or multiple routes. Routing support is explained in Chapter 13.

OpenLS, which provides location-based services based on the Open Location Services Initiative (OpenLS) specification for geocoding, mapping, routing, and yellow pages. OpenLS support is explained in Chapter 14.

Web Feature Services (WFS), which enables users to find features (roads, rivers, and so on) based on their relationship to a location or a nonspatial attribute. WFS support is explained in Chapter 15.

Catalog Services for the Web (CSW), which describes the Oracle Spatial implementation of the Open GIS Consortium specification for catalog services. According to this specification: "Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects." CSW support is explained in Chapter 16.

For example, an administrator might set up the infrastructure to enable access to spatial features, such as roads and rivers.

Application developers create and manage the spatial data and metadata. They create spatial data tables, create spatial indexes, insert rows into the USER_SDO_GEOM_METADATA view, and use Spatial functions and procedures to implement the application logic.

For example, an application developer might create tables of roads and rivers, and implement application logic that enables end users to find roads and rivers based on spatial query criteria.

End users access the services through their Web browsers.

For example, an end user might ask for all roads that are within one mile of a specific river or that intersect (cross) that river.

From the perspective of an administrator, application developers and end users are all "users" because database users must be created to accommodate their needs. Application developers will connect to the database as users with sufficient privileges to create and manage spatial tables and to use Oracle Spatial functions and procedures. End users will access the database through a database user with limited access privileges, typically read-only access to data or limited write access.

The chapters about Spatial Web services are written for administrators and application developers, not for end users.

10.3Setting Up the Client for Spatial Web Services

Before anyone can use Spatial Web services, you, as an administrator with the DBA role, must ensure that:

The $ORACLE_HOME/md/jlib/sdows.ear file is deployed into an OC4J instance.

The necessary database connections are defined (if you accepted the default location for the sdows.ear file deployment) in the <j2ee_home>/home/applications/sdows/META-INF/data-sources.xml file. This file defines database connections available for use with all Web services, including OpenLS and WFS.

You should then examine and modify the <j2ee_home>/home/applications/sdows/sdows/WEB-INF/conf/WSConfig.xml file, which controls Web services behavior. Example 10-1 shows the Oracle-supplied WSConfig.xml file, which you should modify as needed for your system environment. For more information about how to modify this and other files, see the Readme.txt file for the wsclient.jar demo file (described in Section 10.4, "Demo Files for Sample Java Client").

You must also 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) or to modify configuration files. See the chapters on individual Web services for any specific requirements.

10.4Demo Files for Sample Java Client

To help you get started with Spatial Web services, Oracle supplies a. jar file (wsclient.jar) with the source code and related files for setting up a sample Java client. To use this file, follow these steps:

Find wsclient.jar under the Spatial demo directory.

Expand (unzip) wsclient.jar into a directory of your choice.

The top-level directory for all the files in the .jar file is named src.

In the src directory, read the file named Readme.txt and follow its instructions.

The Readme.txt file contains detailed explanations and guidelines.

Scripting on this page enhances content navigation, but does not change the content in any way.