Import and Export MDS artifacts in SOA 12c

Oracle SOA-MDS (Metadata Store) repository can be used to access artifacts that can be shared among various SOA composites. For example, we have one common schema for a business fault that is consumed by various applications. Instead of having a localized copy of that schema file in each SOA composite, we can have it in a centralized repository (SOA-MDS). Another benefit of using SOA-MDS is that we can change the file at runtime and need not redeploy the complete code.

While developing SOA composites, we use SOA design-time repository, later these changes can be synced to the SOA servers. In this article, we will discuss 2 ways to sync the artifacts available in the SOA design-time repository and the SOA servers.

  1. Establishing the connection to SOA-MDS in Jdeveloper.
  2. Using SOA em console or Fusion Middleware control console.

Moving a file between SOA composite to SOA design-time MDS repository

Let's assume, we created a businessFault.xsd which will be used by various SOA composites or projects.

Before moving this file to the SOA server MDS location, we need to first push it to the SOA design-time repository. 
  • To do so, right-click on businessFault.xsd and click on Share using SOA Design-Time MDS Repository

  • Make sure, that file is not opened in Jdeveloper else you will get the below error.
  • A wizard will open as below. Click next to proceed.
  • Select the folder in which you want to place the file. For e.g. '/apps/Common'. Click Next.

  • If the document exists with the same name and we want to overwrite, then check the Overwrite if document exists in the target MDS repository. Click Next

  • If there are any references for the document, then those will be displayed along with updates that will happen. In this scenario, the file is not being used currently and the list is empty. Review the changes and click on Finish.
  • We will get a success message.


1. Establishing the connection to SOA-MDS in Jdeveloper.

  • Click on File. Click on New. Under all items select SOA-MDS connection. Click Ok
  • Specify the Connection Name (MDSConnection1). Select the type of connection to MDS, either File-based or DB based.
  • In this example, we will be using File Based MDS. Specify the path to the MDS File location and click on OK.

  • If you want to configure DB based MDS, then you need to either have the MDS DB connection or create a new DB connection to SOA-MDS.
  • Now the New MDS connection will be created and can be viewed under the resources palette.
  • Right-click on the SOA_DesignTimeRepository and then select transfer.
  • Select the files which you want to transfer and specify the target MDS connection. Click on transfer.
  • The file will be copied to the target MDS location i.e. SOA-MDS location. The file will be on the SOA server.

  • Similarly, to transfer files from SOA server MDS repository to SOA_DesignTimeRepository. Right-click MDSConnection1 and select transfer. Specify the files and click transfer. Here in this case target Connection will be SOA_DesignTimeRepository.

2. Using SOA em console or Fusion Middleware control console.

We can download the complete MDS repository in the .jar/.zip file and import it into our Jdeveloper and vice versa.

  • To Download or upload MDS repository .jar/.zip file from em console, Login to em console using the URL http://HOST[: PORT]/em. Click on Target Navigation and click on soa-infra.
  • Click on SOA Infrastructure. A Dropdown menu will appear. Click on Administration and then click on MDS Configuration



  • On this page, we can import or export the MDS repository in the .jar file. To export click on export. A zip file with the name "soa-infra_metadata.zip" will be downloaded. Similarly, to import the jar or zip file click on import.
  • To import this file in Jdeveloper, right-click on SOA_DesignTimeRepository and click on import from Jar. In case you want to export the file click on Export the Jar and specify the file name.
  • Specify the location of the .jar/zip file containing MDS files. Click on import.

Note: It is always better to use the first approach in case files and composites are deployed more on the server.






Comments

Post a Comment

Popular posts from this blog

DateTime formatting using xp20:format-dateTime ()

Create Delimited String from XML Nodes and Vice Versa in SOA 12c