3 Managing Shared Data with the Design-Time MDS Repository

This chapter describes how to manage shared data with the SOA Design-Time Oracle Metadata Services Repository (MDS Repository), including how to create and delete folders, export and import the contents of the /apps folder to and from a JAR file, transfer the /apps folder contents to another SOA Design-Time MDS Repository, export a Release 11g MDS Repository to a JAR file, and use the SOA-MDS Transfer wizard to share data with the SOA Design-Time MDS Repository.

This chapter includes the following sections:

3.1 Introduction to SOA Design-Time MDS Repository Management

A file-based, SOA Design-Time MDS Repository is automatically created when you create a SOA composite application. You cannot modify the MDS Repository name, but you can modify it to point to an existing, file-based repository. You typically point it to the version control system (MDS) location. Sharing operations are done against the design-time repository. You cannot perform these operations against a database-backed MDS Repository.

You can perform the following operations against the SOA Design-Time MDS Repository in Oracle JDeveloper:

  • Browse the following folder recognized by Oracle SOA Suite in the SOA Design-Time MDS Repository:

    • /apps: Contains shared data, including Oracle Service Bus artifacts.

  • Create folders directly under the /apps folder or a subfolder of /apps.

  • Delete files and subfolders under the /apps folder. The /apps folder itself cannot be deleted.

  • Export selected contents of the /apps folder to a JAR file. The /apps folder itself is not included in the JAR file.

  • Import the contents of a JAR file under the /apps folder. If the JAR file includes /apps as the root folder, it is created below the /apps folder of the design-time MDS Repository, which gives you a top-level directory structure of /apps/apps.

  • Transfer the contents of the /apps folder of one MDS Repository to another MDS Repository.

  • Export an existing MDS Repository (for example, a Release 11g database-based MDS Repository) to a JAR file. This JAR file can then be imported into the Release 12c design-time MDS Repository.

3.1.1 Introduction to the Default SOA Design-Time MDS Repository Connection

A file-based, SOA Design-Time MDS Repository connection named SOA_DesignTimeRepository is automatically included when you create a SOA composite application. The default directory location is $JDEV_USER_DIR/soamds.

This connection provides the following capabilities:

  • A file-based MDS Repository for use during design time. A database-based design-time MDS Repository is not supported.

  • Any MDS Repository can be browsed.

  • The default repository location can be modified to point to another folder or version control location.

  • All SOA-MDS operations use this SOA Design-Time MDS Repository.

  • A wizard enables you to share design-time artifacts from your SOA project with this MDS Repository, such as WSDL and schema files.

Note:

  • If you add shared data into the SOA Design-Time MDS Repository, and the repository is backed by a version control system, Oracle SOA Suite does not provide any operations to add this data to the version control system. You must add this shared data to the version control system.

  • If you have a Release 11g SOA composite application with a preconfigured SOA-MDS repository (/apps namespace) in the adf-config.xml file, all sharing and consumption operations are performed against the existing repository defined in adf-config.xml.

3.2 Changing the Default SOA-MDS Location

When you create a SOA composite application, the default SOA-MDS connection named SOA_DesignTimeRepository is automatically included. The /apps folder in the SOA design-time MDS Repository is automatically created.

Note:

When files from an Oracle JDeveloper project are shared using the SOA_DesignTimeRepository, the original files are moved from the SOA project to the default SOA-MDS repository.

3.2.1 How to Change the Default SOA-MDS Location

To change the default SOA-MDS location:

  1. Create a SOA composite application.
  2. From the Window main menu, select Resources.
  3. In the Components window, click Resources.
  4. Expand SOA-MDS. The artifacts shown in Figure 3-1 are displayed.
    • The SOA-MDS connection named SOA_DesignTimeRepository that was automatically created during SOA composite application.

    • The /apps folder in the MDS Repository. This folder is initially empty.

    Figure 3-1 Resources Window in Oracle JDeveloper

    Description of Figure 3-1 follows
    Description of "Figure 3-1 Resources Window in Oracle JDeveloper"
  5. Right-click the SOA_DesignTimeRepository connection and select Properties to point it to your version control location.

    The Edit MDS-SOA Connection dialog is displayed.

  6. In the MDS Root Folder field, click Browse.
  7. Select the version control location for the /apps folder, and click Select. The SOA-MDS browser only displays the /apps and /soa folders. Therefore, if /apps is not present in the selected version control location, then it is not rendered by the browser.

    The specified location is displayed in the Edit MDS-SOA Connection dialog, as shown in Figure 3-2.

    Figure 3-2 Edit SOA-MDS Connection Dialog

    Description of Figure 3-2 follows
    Description of "Figure 3-2 Edit SOA-MDS Connection Dialog"
  8. Click OK, and expand the SOA_DesignTimeRepository connection.

    The /apps folder is populated with the location specified in Step 7, as shown in Figure 3-3.

    Figure 3-3 Populated /apps folder

    Description of Figure 3-3 follows
    Description of "Figure 3-3 Populated /apps folder"

3.3 Sharing Data with the SOA Design-Time MDS Repository

The SOA-MDS Transfer wizard enables you to share WSDL, XSD, WADL, and XQuery files with the SOA design-time MDS Repository. These files can then be shared with other SOA composite applications.

The wizard first attempts to share files with any existing design-time MDS Repository defined in the current application's adf-config.xml file. If no MDS Repository is defined in the adf-config.xml file, then artifacts are shared using SOA_DesignTimeRepository.

Note:

  • You can only share XSD, WSDL, WADL, and XQuery files. In addition, only these file types can be transferred from a design-time MDS Repository to a runtime MDS Repository.

  • If you right-click an XSD file in the Applications window that was created with the Native Format Builder wizard, the Share using SOA Design-Time MDS Repository option is not available.

3.3.1 How to Share Data with the SOA Design-Time MDS Repository

To share data with the SOA design-time MDS Repository:

  1. In the Applications window, right-click the file to share (for this example, an XSD file) and select Share using SOA Design-Time MDS Repository. Figure 3-4 provides details.

    Figure 3-4 Data Sharing with the SOA Design-Time MDS Repository

    Description of Figure 3-4 follows
    Description of "Figure 3-4 Data Sharing with the SOA Design-Time MDS Repository"

    The SOA-MDS Transfer wizard - Welcome page is displayed and indicates that the file you selected is to be transferred to the SOA design-time MDS Repository.

  2. Click Next.

    The Choose Target dialog is displayed.

  3. Browse the design-time MDS Repository and select the target folder in which to share the selected artifact, and click Next. You can also create a subfolder in which to share the file or search for an existing folder. Figure 3-5 provides details.

    Figure 3-5 SOA-MDS Transfer Wizard - Choose Target Page

    Description of Figure 3-5 follows
    Description of "Figure 3-5 SOA-MDS Transfer Wizard - Choose Target Page"

    The Dependencies dialog is displayed.

  4. Review the files to transfer to the target oramds URL location in the design-time MDS Repository, as shown in Figure 3-6.

    Additional dependent files can also be displayed. For example, assume you select a WSDL file. Because the WSDL file can have dependencies on schema files (potentially more than one file), those XSD files are also displayed.

    Figure 3-6 SOA-MDS Transfer Wizard - Dependencies Page

    Description of Figure 3-6 follows
    Description of "Figure 3-6 SOA-MDS Transfer Wizard - Dependencies Page"

    The green checkmark indicates that the file path is correct and resolvable.

    Note:

    • If the URL is not accessible, an error icon is displayed. For example, assume you are transferring a WSDL file that has dependencies on schemas that traverse several parent levels (for example, ../../../). If such references are present in the WSDL and you do not select the correct target folder, the URL may go beyond the /apps folder, which is not accessible to the SOA Infrastructure. The error icon indicates the target URL is not accessible, and you cannot proceed with the transfer. You must cancel or click Back to select a different target folder. In summary, the destination for all URLs must begin with the /apps folder.

    • File transfers are in relation to the /apps folder in the target SOA design-time MDS Repository. Dependent files are typically at the same parallel level. For example, the WSDL file selected for transfer is located in the WSDLs folder and the dependent XSD file is located in the Schemas folder. Both folders are at the same parallel level under the SOA folder of the SOA composite application in the Applications window. However, if the dependent files are at different levels (higher levels than the file that is being shared), you must determine the relative hierarchy of the files. For example, If foo.wsdl refers to an XSD file in the location ../../../.xsd, you must manually create three subfolders under apps in the target design-time MDS Repository and share foo.wsdl to the lowest folder level so that the XSD can be shared at the apps level.

  5. If you want to overwrite files, select Overwrite if document exists in the target MDS repository, then click Next. If you do not select this check box, and the files already exist in the target location, no files are transferred and an error message is displayed. You cannot selectively transfer specific files.

    The References dialog is displayed.

  6. View the files to be modified after the transfer with the appropriate oramds URL, and click Finish, as shown in Figure 3-7. This list includes files that are dependent on the files being moved. All dependent files are modified to reflect the oramds URL of the file being moved.

    Figure 3-7 SOA-MDS Transfer Wizard - References Page

    Description of Figure 3-7 follows
    Description of "Figure 3-7 SOA-MDS Transfer Wizard - References Page"
  7. Click OK when prompted with a message that the transfer completed successfully.

    When complete, the following updates are made:

    • The selected artifacts are displayed beneath the SOA-MDS connection in the Resources window.

    • The adf-config.xml file in the Applications window is modified with the /apps namespace:

      <namespace path="/apps" metadata-store-usage="mstore-usage_2"/>
      

      The variable that internally points to the SOA design-time MDS Repository home is set:

      value="${soamds.apps.home}
      
    • A reference in the artifact (for example, a WSDL file) is updated to point to the oramds URL location.

3.4 Creating and Deleting Subfolders Under the /apps Folder

You can create and delete subfolders under the /apps folder in the SOA Design-Time MDS Repository. You cannot delete the /apps folder.

3.4.1 How to Create and Delete Subfolders Under the /apps Folder

To create and delete subfolders under the /apps folder:

  1. Right-click the /apps folder or a subfolder of /apps, and select Create Folder to point it to your version control location.

    The Create Folder dialog is displayed.

  2. Enter a name (for this example, Foo is entered) for the folder, and click OK.

    The folder is created under the /apps folder, as shown in Figure 3-8.

    Figure 3-8 New Subfolder Under /apps Folder

    Description of Figure 3-8 follows
    Description of "Figure 3-8 New Subfolder Under /apps Folder"
  3. Right-click the folder to delete (for this example, Foo), and select Delete.

    The folder is deleted, as shown in Figure 3-9.

    Figure 3-9 Subfolder Deleted Under /apps Folder

    Description of Figure 3-9 follows
    Description of "Figure 3-9 Subfolder Deleted Under /apps Folder"

3.5 Exporting the Selected Contents of the /apps Folder to a JAR File

You can export the selected contents of the /apps folder in the SOA design-time MDS Repository to a JAR file. The /apps folder itself is not exported to the JAR.

3.5.1 How to Export the Selected Contents of the /apps Folder to a JAR File

To export the selected contents of the /apps folder to a JAR file:

  1. Right-click the SOA-MDS connection that includes the contents to export (for example, the default SOA_DesignTimeRepository connection or another connection), and select Export to Jar, as shown in Figure 3-10.

    Figure 3-10 Export to Jar Command

    Description of Figure 3-10 follows
    Description of "Figure 3-10 Export to Jar Command"

    The Export to jar dialog is displayed.

  2. Provide values appropriate to your environment, and click OK, as described in Table 3-1.

    Table 3-1 Export to jar Dialog

    Field Description

    Select documents to export

    Enter a file or folder name and click Search or manually expand the /apps folder to identify and select folders and files to export to a JAR file.

    Preview Documents Selected

    Select to preview the contents to export.

    JAR Name

    Click Browse to select the JAR file to which to export the selected folders and files.


    The Export to jar dialog looks as shown in Figure 3-11.

    Figure 3-11 Export to jar Dialog

    Description of Figure 3-11 follows
    Description of "Figure 3-11 Export to jar Dialog"
  3. Click OK when prompted with a message indicating that the export was successful.

3.6 Importing the Contents of the JAR File into the /apps Folder

You can import the contents of a JAR file to the /apps folder of a SOA design-time or database-backed MDS Repository. If you import a JAR file that includes /apps as the root folder, it is created below the /apps folder of the design-time MDS Repository, which gives you a top-level directory structure of /apps/apps.

3.6.1 How to Import the Contents of the JAR File into the /apps Folder

To import the contents of the JAR file into the /apps folder:

  1. Right-click the SOA-MDS connection in which to import the JAR file (for example, the default SOA_DesignTimeRepository connection or another connection), and select Import From JAR.
  2. Click Browse to select the JAR to import.

    The Import from jar dialog is displayed, as shown in Figure 3-12.

    Figure 3-12 Import from jar Dialog

    Description of Figure 3-12 follows
    Description of "Figure 3-12 Import from jar Dialog"

    A green checkmark indicates that the contents do not exist in the target repository. If the content exists in the target repository, a warning icon is displayed. You can select to overwrite the content by clicking Import or cancel the entire import operation by clicking Cancel. You cannot selectively import specific files.

  3. Click Import. Any artifacts with a warning icon are overwritten.

    The contents of the imported JAR file are displayed under the /apps folder, as shown in Figure 3-13.

    Figure 3-13 Contents of Imported JAR File in Resources Window

    Description of Figure 3-13 follows
    Description of "Figure 3-13 Contents of Imported JAR File in Resources Window"

3.7 Transferring the Selected Contents of the /apps Folder to Another MDS Repository

You can transfer the selected contents of the /apps folder of one MDS Repository to the /apps folder of another MDS Repository. There are no limitations on the type of MDS Repository to which to transfer. For example, you can transfer the selected contents of a file-based repository to a database-based MDS Repository, and vice versa.

Note:

Do not transfer the contents of the /apps folder to another MDS Repository with the Oracle BPEL Designer, Human Task Editor, or other editors open. If you do, ensure that you then close and reopen the editors after the transfer completes. An open editor does not reflect the transfer changes and becomes unsynchronized unless you completely exit it.

3.7.1 How to Transfer the Selected Contents of the /apps Folder to Another MDS Repository

To transfer the selected contents of the /apps folder to another MDS Repository:

  1. Right-click the SOA-MDS connection that includes the contents to transfer (for example, the default SOA_DesignTimeRepository connection or another connection), and select Transfer. Figure 3-14 provides details.

    Figure 3-14 Transfer Menu Option

    Description of Figure 3-14 follows
    Description of "Figure 3-14 Transfer Menu Option"

    The Transfer to SOA-MDS dialog is displayed.

  2. Provide values appropriate to your environment, and click OK, as described in Table 3-2.

    Table 3-2 Transfer to SOA-MDS Dialog

    Field Description

    Select Documents to Transfer

    Select the contents to transfer.

    Preview Documents Selected

    Select to preview the contents to transfer.

    Target Connection

    Select the SOA-MDS connection of the MDS Repository to which to transfer contents.


    The Transfer to SOA-MDS dialog looks as shown in Figure 3-15.

    Figure 3-15 Transfer to SOA-MDS Dialog

    Description of Figure 3-15 follows
    Description of "Figure 3-15 Transfer to SOA-MDS Dialog"
  3. Click OK when prompted with a message indicating that the transfer was successful.

    The contents are displayed under the /apps folder of the SOA-MDS target connection you selected in the Target Connection field in Step 2. Figure 3-16 provides details.

    Figure 3-16 Contents Display Under /apps Folder of Selected SOA-MDS Connection

    Description of Figure 3-16 follows
    Description of "Figure 3-16 Contents Display Under /apps Folder of Selected SOA-MDS Connection"

3.8 Exporting an Existing Release 11g MDS Repository to a JAR File

You can export a Release 11g MDS Repository to a JAR file that can then be imported into a Release 12c design-time MDS Repository. The adf-config.xml file is updated with /apps and store information. Release 12c repositories can also be exported if you have an adf-config.xml file with /apps defined (meaning you have an existing shared repository).

3.8.1 How to Export an Existing Release 11g MDS Repository to a JAR File

To export an existing Release 11g MDS Repository to a JAR file:

  1. In the Applications window, right-click adf-config.xml of the project to export, and select Export SOA-MDS Contents. Figure 3-17 provides details.

    Figure 3-17 Export of an 11g MDS Repository from the Applications Window

    Description of Figure 3-17 follows
    Description of "Figure 3-17 Export of an 11g MDS Repository from the Applications Window"

    The Export to jar dialog is displayed.

  2. Select the Release 11g MDS Repository to export to a JAR file.
  3. To import the JAR file into a Release 12c design-time MDS Repository, see section Importing the Contents of the JAR File into the /apps Folder.

3.9 Browsing for Files in the SOA Design-Time MDS Repository

You can browse for and select files in the SOA Design-Time MDS Repository. For example, the WSDL Chooser dialog that you access from the Create Web Service dialog includes a selection for the SOA Design-Time MDS Repository, as shown in Figure 3-18.

Figure 3-18 SOA-MDS Selection in the WSDL Chooser Dialog

Description of Figure 3-18 follows
Description of "Figure 3-18 SOA-MDS Selection in the WSDL Chooser Dialog"

The Type Chooser dialog includes a Recent Files folder in which information is kept for the duration of the Oracle JDeveloper session. For example, if you create a new BPEL process and want to define the input variable from a schema in the SOA Design-Time MDS Repository, you go there once. When you want to define the output variable from the same schema, the schema remains visible in the Recent Files folder. Figure 3-19 shows the Recent Files folder.