Skip navigation.
Downloads | Product Documentation | Support

Administration Guide

# Configuring Access to XML Files

Before a BEA Liquid Data for WebLogic query can access data in an XML file, the XML file must be configured as a Liquid Data data source. The XML file must also be added to the `xml_files` folder of the Liquid Data Server repository, as described in Uploading Files to the Server Repository. Once configured according to the instructions in this chapter, XML files with data source descriptions will show up as data sources available for use in any EJB client, such as the Data View Builder, that connects to this server.

The following sections are included:

- Creating an XML File Data Source Description
- Summary of Configured Data Sources
- Modifying an XML File Data Source Description
- Removing an XML File Data Source Description

# Creating an XML File Data Source Description

To access an XML file from Liquid Data, you must first create a data source description that tells Liquid Data how to find the XML file.

Note: You must log in with `modify` access before you can create a data source description. For more information, see Defining Liquid Data Roles and Groups.

Table 8-1 Liquid Data XML Flat File Data Source Description

Field | Description | Required
--- | --- | ---
Name | Logical name of the XML file. | Yes.
Data File | XML data file. One of the following formats: Name of the file that resides in the Liquid Data server repository. Enter the file name, or click Browse Repository to select it. If you have not done so already, save the XML file you want to use as a Liquid Data data source in the server repository. For more information, see Managing the Liquid Data Server Repository. File URL, such as: `file:///D:/bea7a/weblogic700/liquiddata/docs/data.xml` HTTP URL, such as: `http://bea.com/data.xml` | Yes, unless you check the Dynamic Data Source button.
Schema | Schema for the XML file in the server repository. Enter the file name, or click Browse Repository to select it. | Yes.
Namespace URI | Identifies the target namespace of the schema file. Example: `urn:schemas-bea-com:ld-cptSample` | Optional but recommended. If used, Schema Root Element Name must also be supplied.
Schema Root Element Name | Identifies a unique root element in the schema file. Many schemas have only a single root. In cases where there are multiple root elements, only elements under the identified root will available as an XML data source. For example, the sample schema `CustomerOrderReport` described in the Liquid Data Getting Started document has only a single root, `CustomerOrder`. | Yes.
Dynamic Data Source | Check this box if the data source is to be supplied at query runtime. If it is checked, you must specify a second parameter for the `xf:document` function in the XQuery with a file name. The name has the same rules as those stated for the data file. | Optional.

To create a data source description for an XML file:

1. In the left pane, click the Liquid Data node.
2. In the right pane, click the Configuration tab.
3. Click the Data Sources tab.
4. Click the XML File tab.
5. Click the Configure a new XML file source description text link.

The configuration tab for creating a new XML file Liquid Data source description is displayed.

Figure 8-2 Configuring a Liquid Data Source Description for an XML File

6. Fill in the fields as detailed in Table 8-1.
7. Click Create.

The Administration Console displays the new XML file data source description in the summary table.

Note: You must configure access to this data source description, as described in Configuring Secure Access to Data Source Descriptions. In addition, you can configure access to any underlying XML files in the repository, as described in Configuring Secure Access to Items in the Server Repository.

# Summary of Configured Data Sources

The summary table shows a list of configured data sources of a particular type and a subset of configuration information for quick scanning. From the summary list, you can do the following:

- Navigate to the configuration for a particular data source by clicking on it in the table.
- If you want to set a security policy for the data source (and security in enabled for your Liquid Data domain), click Define Security Policy or Edit Security Policy on the data source to which you want to assign security. If the object already has a policy defined, the link is labeled "Edit Security Policy"; if the object has no defined policy, the link is labeled "Define Security Policy." For more information, see Configuring Secure Access to Data Source Descriptions.
- Remove an existing data source by clicking the trash can next to it.
- If there is a known configuration problem for a data source, a red mark appears in the Status column of the summary table. For details on the data source status, see Checking the Status of Liquid Data Resources.

Note: You can also view all data sources from the All Data Sources configuration tab on the Liquid Data node in the Administration Console, as described in Viewing and Accessing All Configured Data Sources.

# Modifying an XML File Data Source Description

You can modify an existing XML file data source description.

Note: You must log in with `modify` access before you can modify a data source description. For more information, see Defining Liquid Data Roles and Groups.

To modify an existing data source description for an XML file:

1. In the left pane, click the Liquid Data node.
2. In the right pane, click the Configuration tab.
3. Click the Data Sources tab.
4. Click the XML File tab.

A table of configured Liquid Data XML files is shown.

5. Click on the XML file for which you want to modify the source description.
6. Change the settings as needed.
7. Click Apply.
8. Verify the operation of any existing queries that depend on the data source configuration you just changed.

# Removing an XML File Data Source Description

You can remove a data source description that you no longer need. Removing a data source description does not remove the actual XML file to which it refers. To explicitly remove the XML file from the repository, see Deleting Folders and Files in the Server Repository.

Note: You must log in with `modify` access before you can remove a data source description. For more information, see Defining Liquid Data Roles and Groups.

To remove a data source description for an XML file:

1. In the left pane, click the Liquid Data node.
2. In the right pane, click the Configuration tab.
3. Click the XML File tab.

A table of configured Liquid Data XML data sources is shown.

4. Find the XML file that you want to remove and click the trash can next to it.
5. When prompted, click Yes to confirm removal.

The Administration Console removes the selected data source description.