bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Translating Data

Retrieving and Storing Repository Documents

The repository provides centralized storage for the following document types:

- Message Format Language (MFL)

- XML Document Type Definition (DTD)

- XML Schema

- XSLT Stylesheet

The repository makes it possible for documents of these types to be shared in WebLogic Integration. The repository provides access to these document types and enables you to manipulate repository documents: you can access the text, description, and notes for a document, and you can remove a document. The repository allows supported documents to be shared by WebLogic Server, business process management, and B2B integration functions. The repository also offers a batch import utility that facilitates the migration of previously constructed MFL, DTD, XML Schema, and XSLT documents residing on a different file system.

This section discusses the following topics:

- Logging Into the Repository

- Repository Menu Commands

- Retrieving MFL Documents from the Repository

- Storing MFL Documents in the Repository

- Importing Documents into the Repository

- Using the Repository Retrieve and Store Dialog Boxes

Logging Into the Repository

Before you can retrieve documents from, or store documents to the repository, you must be logged in.

To log into the repository:

1. If it is not already started, choose Start—>Programs—>BEA WebLogic Platform 7.0—>WebLogic Integration 7.0—>Format Builder to start Format Builder.

2. Choose Repository—>Log In to display the WebLogic Integration Repository Login dialog box.

3. Enter your user name, password, and the name of the server on which the repository resides.

   For example, if WebLogic Integration is running on the local machine, you would enter the values shown in the following figure to login as the default admin user.

   Figure 5-1 WebLogic Integration Repository Login Dialog Box

   Note: For default users and passwords see "WebLogic Integration Users and Passwords" in Getting Started in Starting, Stopping, and Customizing BEA WebLogic Integration.

4. Click Connect.

   If your login is successful, the dialog box is dismissed and the Format Builder Title bar displays the server name and port number. You may now select any of the active repository menu commands.

   Note: The WebLogic Integration Repository Login dialog box allows up to three unsuccessful login attempts, after which a login failure message is displayed. If you fail to log in after three attempts, choose Repository—>Log In to repeat the login procedure.

Repository Menu Commands

The following table describes the commands that are available from the Repository menu.

Command | Description
--- | ---
Log In | Displays the WebLogic Integration Repository Login dialog box, allowing you to connect to the repository.
Log Out | Disconnects from the repository.
Retrieve | Retrieves a document from the repository.
Store | Stores the current document in the repository.
Store As | Stores the current document in the repository under a different name.

Retrieving MFL Documents from the Repository

To retrieve an MFL document from the repository:

1. If it is not already started, choose Start—>Programs—>BEA WebLogic Platform 7.0—>WebLogic Integration 7.0—>Format Builder to start Format Builder.

2. Log into the repository as described in the preceding procedure, Logging Into the Repository.

3. Choose Repository—>Retrieve to display the Select document to retrieve dialog box.

   Figure 5-2 Select document to retrieve dialog box

   In the Select document to retrieve dialog box, double-click a folder to view its contents, or click the icon to the left of the Current Folder text box to navigate back to the parent folder. Document names and descriptions are displayed to assist in selection. For detailed information about using this dialog box, see Using the Repository Retrieve and Store Dialog Boxes.

4. Locate and select the MFL document you want to retrieve.

   Note: Only MFL documents can be retrieved in Format Builder.

5. Click Retrieve.

   The selected document is displayed in the navigation tree. You can select the root node to display the detail window for the document as shown in the following figure. Note that when the active document is a repository document, the detail window includes a Document Repository Properties section.

   Figure 5-3 Repository Document in Format Builder

When you retrieve a repository document, you can edit it the same way you edit any MFL document in Format Builder. When you are ready to save your changes, do one of the following:

- To save the document to the repository, choose Repository—>Store.

- To save the document to the repository with a different name, choose Repository—>Store As. For details, see the following procedure, Storing MFL Documents in the Repository.

- To save the document as a local file, choose File—>Save As. For details, see Saving or Storing a Message Format.

Storing MFL Documents in the Repository

To store an MFL document to the repository:

1. If it is not already opened, open the document in Format Builder.

2. Log into the repository as described in Logging Into the Repository.

3. Choose Repository—>Store As.

   The Store As dialog box is displayed. For detailed information about using this dialog box, see Using the Repository Retrieve and Store Dialog Boxes.

4. In the Name field, enter the name you want to assign to the document.

5. In the description field, enter a description of the document.

6. In the Notes field, enter any notes you would like to associate with the document.

7. Click Store.

   The document is stored in the repository. When you select the root node, the detail window displays the repository name, description, and notes.

   Note: If your Format Builder options specify the generation of a DTD and/or XML Schema file, the appropriate file, or files, will also be stored in the repository using the specified name.

Importing Documents into the Repository

The batch import utility for the WebLogic Integration repository offers a command-line interface to the repository. This utility makes it easy to import previously built MFL documents into the repository. The batch importer can import MFL, DTD, class, XSLT, and XML Schema documents in any combination. It works with any plug-in repository.

Use of the repository importer with the business process management repository depends on the existence of a wlxt-wlpi-repository.properties file in a CLASSPATH directory. The property file is created by the Format Builder the first time you log into the repository. Either add the directory for your existing property file to the classpath you are using, or create a wlxt-wlpi-repository.properties file containing the following:

>     wlxt.repository.url=t3\://host\:port

Here, port is the WebLogic Server port number (the default port is 7001) and host is the WebLogic Server computer name or IP address. Specify localhost or 127.0.0.1 if the server is running on the local machine.

On Windows systems, a script named LaunchImport.cmd is included in WLI_HOME\bin. If you use this script to launch the Import utility, the CLASSPATH will be properly set before the utility is launched. Modify the script to reflect the applicable repository path and filelist for the import operation.

To launch the import utility directly, invoke the Batch Import Utility at the command prompt, using the following command.

>     java com.bea.wlxt.repository.Import [-v] [-n] [-t type] [-f folder] files...

The following table describes the options.

Table 5-1 Options for the Import Command

Option | Description
--- | ---
-v | Specifies that verbose mode is on. This switch may appear anywhere within the command line and affects all operations listed after it. Verbose mode is disabled by default.
-n | specifies that verbose mode is off. This switch may appear anywhere within the command line and affects all operations listed after it. Verbose mode is disabled by default.
-f | Optional switch for specifying the parent folder of all the following files. Multiple -f switches may be specified to change folders during an import execution. By default, documents are imported into the root folder of the repository. A special -f switch argument of @ may be used to specify the root folder. Folder names specified in the -f switch are always absolute pathnames from the repository root folder. Folder names within a path should be separated by forward slashes.
-t | Optional switch for specifying the default type of all the files listed after it. The default type is assigned to documents when the document type cannot be determined by the file extension. Valid values are .mfl, .dtd, .class, .xsl, and .xsd.
files | Specifies one or more filenames to be imported. Wildcard characters supported by the shell or operating system can be used.

All options take effect at the point in the command line at which they are encountered and remain in effect until overridden by another option. For example, the following command imports all .dtd, .class, and .mfl files in the current directory, but enables verbose mode only while class files are being imported.

>     java com.bea.wlxt.repository.Import *.dtd -v *.class -n *.mfl

The type of an imported document is derived from the extension in the document's filename, as shown in the following table.:

Table 5-2 Supported Document Types and Extensions

File Extension | Document Type Assigned
--- | ---
.dtd | DTD
.xsd | XML Schema
.mfl | MFL
.class | Java class
.xsl | Extensible Stylesheet Language
Any other extension | Default type (defaults to MFL)

Using the Repository Retrieve and Store Dialog Boxes

The following dialog boxes are used to retrieve and store repository documents:

- Select document to retrieve dialog box

- Store Document dialog

The following figure shows the Select document to retrieve dialog box.

Figure 5-4 Select Document to Retrieve Dialog Box

The following figure shows the Store Document dialog box. This dialog box differs from the Select document to retrieve dialog box in only one respect: it allows you to enter a new document name, description, and notes.

Figure 5-5 Store Document Dialog Box

The following table describes the elements of the Select document to retrieve and Store document dialog boxes.

Table 5-3 Retrieve and Store Dialog Box Elements

Field, Icon, or Button | Definition
--- | ---
Current Folder field | Contains the name of the current repository folder.
Up Folder icon | Click to move up to the parent of the current folder if the current folder is not the root folder of the repository.
Root Folder icon | Click to return to the root folder of the repository.
New Folder icon | Click to create a new folder in the current folder. This icon is disabled if the repository does not support folders.
Contents field | Lists the folders and MFL documents in the current folder. Each entry in the list is prefixed by an icon indicating the type of object. If you select an entry in the list, the information associated with it is displayed in the Name, Description, and Notes fields. If you double-click a folder it becomes the current folder. If you double-click an MFL document in the Select document to retrieve dialog box, the document is opened in Format Builder.
Name field | The name of the folder or document.
Description field | A description of the folder or document.
Notes field | Notes associated with to the folder or document.
Retrieve button/Store button | In the Select document to retrieve dialog box, click Retrieve to open the selected document in Format Builder. In the Store Document dialog box, click Store to save the active document to the repository. If you click the Retrieve or Store button while a folder is selected, that folder becomes the current folder.
Cancel button | Click to close the dialog box without applying changes.

Using the Shortcut Menu

When you right-click a folder or document in the Select document to retrieve or Store Document dialog box, a shortcut menu is displayed that allows you to rename, delete, or view and update the properties of the selected object. The following figure shows the shortcut menu.

Figure 5-6 Store Document Shortcut Menu

Table 5-4 Shortcut Menu Commands

Command | Description
--- | ---
Delete | Displays the Confirm Delete dialog box. Click Yes to delete the object or No to cancel the operation.
Rename | Displays the Rename Document dialog box. Enter the new name and click OK to rename the document, or click Cancel to cancel the operation.
Properties | Displays the Modify Properties dialog box. Modify the Description and Notes fields as required, and then click OK to update or Cancel to cancel the operation.