5 Setting Up Data Services

This chapter describes how to configure data services with Oracle Data Integrator. Data services enable access to your data via a web service interface. Data services also allow access to the changes captured using Oracle Data Integrator's Changed Data Capture feature. See "Using Journalizing" in Developing Integration Projects with Oracle Data Integrator for more information on Changed Data Capture.

This chapter includes the following section:

5.1 Setting Up Data Services

Data services are deployed in a web service container (an application server into which the web service stack is installed). This web service container must be declared in the topology in the form of a data server, attached to the JAX-WS technology.

As data services are deployed in an application server, data sources must also be defined in the topology for accessing the data from this application server, and deployed or created in the application server.

Setting up data services involves steps covered in the following sections:

5.1.1 Configuring the Web Services Container

You must declare the web service container as a data server in the topology, in order to let Oracle Data Integrator deploy Data Services into it.

Note:

Be careful not to mistake the web service containers and the servers containing the data. While both are declared as data servers in Oracle Data Integrator, the former do not contain any data. They are only used to publish Data Services.

Web service containers declared in Oracle Data Integrator have one of three modes of deploying Web Services:

  • Copying files directly onto the server, if you have file access to the server.

  • Uploading onto the server by FTP.

The next steps in the configuration of the Web Services container depend on the type of web service container and the deployment mode you choose to use.

To configure a web service container:

  1. In Topology Navigator expand the Technologies node in the Physical Architecture panel.

  2. Right-click the JAX-WS technology and select New Data Server.

  3. Fill in the following fields in the Definition tab:

    • Name: Name of the Data Server that will appear in Oracle Data Integrator.

      For naming data servers, it is recommended to use the following naming standard: <TECHNOLOGY_NAME>_<SERVER_NAME>.

    • Base URL for published services: Enter the base URL from which the web services will be available. For Oracle WebLogic Server, it is http://<host>:<HTTP Port>/.

  4. Select one of the following Deployment options:

    • Save web services into directory: directory into which the web service will be created. It can be a network directory on the application server or a local directory if you plan to deploy the web services separately into the container.

    • Upload web services by FTP: select this option to upload the generated web service to the container. You must provide a FTP URL as well as a User name and Password for performing the upload operation.

  5. From the File menu, click Save. The data server appears in the physical architecture.

  6. Select this data server, right-click and select New Physical Schema. A new Physical Schema Editor appears. In the Context tab, use a context to associate the new physical schema to an existing logical schema. It may be necessary to first create a new logical schema of the JAX-WS technology. The process for creating logical schemas is detailed in "Setting Up a Topology".

  7. From the File menu, click Save.

You only need to configure one physical schema for the web container. Note that the logical schema/context/physical schema association is important here as the context will condition the container into which deployment will take place.

5.1.2 Setting up the Data Sources

The Data Services generated by Oracle Data Integrator do not contain connection information for sources and targets. Instead, they make use of data sources defined within the Web Services container or on the application server. These data sources contain connection properties required to access data, and must correspond to data servers already defined within the Oracle Data Integrator topology.

To set up a data source, you can either:

  • Configure the data sources from the application server console. For more information, refer to your application server documentation.

  • Deploy the data source from Oracle Data Integrator if the container is an Oracle WebLogic Server. See "Setting Up a Topology" for more information on data source deployment.

5.1.3 Configuring the Model

To configure Data Services, you must first create and populate a model. See the "Creating and Using Data Models and Datastores" chapter in Developing Integration Projects with Oracle Data Integrator for more information.

You should also have imported the appropriate Service Knowledge Module (SKM) into one of your projects. The SKM contains the code template from which the Data Services will be generated. For more information on importing KMs, see the "Creating an Integration Project" chapter in Developing Integration Projects with Oracle Data Integrator.

To configure a model for data services:

  1. In the Models tree in the Designer Navigator, select the model.

  2. Double-click this model to edit it.

  3. Fill in the following fields in the Services tab:

    • Application server: Select the logical schema corresponding to the container you have previously defined.

    • Namespace: Type in the namespace that will be used in the web services WSDL.

    • Package name: Name of the generated Java package that contains your Web Service. Generally, this is of the form com.<company name>.<project name>.

    • Name of the data source, as defined in your container. Depending on the Application server you are using, the data source might be local or global:

      • If your data source is global, you only need to enter the data source name in the Datasource name field.

      • If your data source is local, the data source name should be prefixed by java:/comp/env/.

      Note that OC4J uses per default a global data source, Tomcat a local data source. Refer to the documentation of your application server for more information.

    • Name of data service: This name is used for the data services operating at the model level. You can also define a data service name for each datastore later.

  4. Select a Service Knowledge Module (SKM) from the list, and set its options. See Connectivity and Knowledge Modules Guide for Oracle Data Integrator for more information about this KM and its options. Only SKMs imported into projects appear in this list.

  5. Go to the Deployed Datastores tab.

  6. Select every datastore that you wish to expose with a data service. For each of those, specify a Data Service Name and the name of the Published Entity.

  7. From the File menu, click Save.

Although not required, you can also fine-tune the configuration of the generated data services at the datastore and attribute level.

For example, you can specify the operations that will be permitted for each attribute. One important use of this is to lock an attribute against being written to via data services.

To configure data services options at the datastore level:

  1. In the Models tree in the Designer Navigator, select the datastore.

  2. Double-click this datastore to edit it.

  3. Select the Services tab.

  4. Check Deploy as Data Service if you want the datastore to be deployed.

  5. Enter the Data Service Name and the name of the Published Entity for the datastore.

  6. From the File menu, click Save.

To configure data service options at the attribute level:

  1. In the Models tree in the Designer Navigator, select the attribute.

  2. Double-click this attribute to edit it.

  3. Select the Services tab.

  4. Check the operation that you want to allow: SELECT, INSERT, DELETE. The INSERT action includes the UPDATE action.

  5. From the File menu, click Save.