Friday, June 14, 2013

SOA 11g MDS - Sharing artifacts in MDS repository

SOA 11g MDS - Sharing artifacts in MDS repository


All SOA projects that are deployed on to SOA infrastructure are stored in the MDS repository. However the artifacts within the projects are not shared b/w each other. If you create a connection from the JDeveloper 'Resource Palette' to the SOA MDS, there will be a 'deployed composites' folder which will contain all deployed artifacts.

Sharing artifacts(like xsd's, wsdl's, xsl's) can be achieved as explained below.

 
SOA 11g provides us with MDS repository (file based & DB based). Common artifacts can be stored here and also can be referenced by all projects in the SOA infrastructure.

File based MDS is used during development time where as DB based MDS is used at run-time by the SOA infra.

During design time/development time store the common artifacts in file based MDS location(this is under the <Jdeveloper home>), then for it be available during runtime(for SOA-INFRA) and also if others in your team wants to reference it in their projects(in development state), it should be made available in DB Based MDS.

There are two steps to make artifacts to be shared.
1) Create File based MDS and place the artifacts
2) Upload it to DB based MDS.

Creating File based MDS and place the artifacts

First step here is to create the folder structure in the file based MDS as required.
Location: <jdeveloper-home>\integration\seed

General practice is to create 'apps' directory inside 'seed' and then create different folders based on artifact type it holds/stores.


To start referencing the artifacts that you placed in the above directories within your own projects in Jdeveloper, you have make sure to edit adf-config.xml file. This is available in every project that you create in Jdeveloper.

A configuration file named adf-config.xml is part of every SOA project manages this partition mapping to be used by JDeveloper during design/deploy time. 

Open the file and add the name space as shown in the screen below,

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

 

After this we can start referencing the artifacts placed in the MDS as below

Open variables section in your BPEL process, and click on create variable and then click on import schema file on top right corner.

Use the location as mentioned in the URL section and click ok

 

Select the element and click OK


 
After the above steps, the below import statement will be placed in the process wsdl file.

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://xmlns.oracle.com/TestApplication/TestProject/PurchaseOrder"
schemaLocation="oramds:/apps/xsd/PurchaseOrder.xsd"/>
</xsd:schema>

At this point we have successfully created a File based MDS, placed the artifacts in it and also used it in our project.

However this is not enough for runtime processing, the next step is to make it available to SOA infra. That is, deploy it to DB-Based MDS. Once it is deployed to DB-Based MDS, the artifacts are visible to SOA-Infra and other developers who can access it and use in their projects.

To do this, you can use either Ant scripts or Jdeveloper, screens below shows how to deploy using Jdeveloper.

Step 1: Create a new application(Generic Application) and name the application as PurchaseOrderMDSApp and click next

Step 2: Provide name for the project (PurchaseOrderMDSProject)and click finish

Step 3: Right click on the project and select 'Project Properties'.
In the 'Project Properties' dialog, select 'Deployment' and create a new deployment profile by clicking on 'New' button

In the 'Create Deployment Profile' dialog, select 'Archive Type' as 'JAR File' and name the deployment profile as DBBasedMDSArchive and click 'OK'


 'Edit JAR Deployment Profile Properties' dialog opens up. Click on the 'Contributors' section under 'File Groups -> Project Output'.

Click on the 'Add..' button and select the folder where the 'artifacts to be deployed' is present.
File based MDS location can be selected where the content is already placed & available. Click OK


Click on the 'Filters' section and select the artifacts under the '/apps' that you would like to deploy or upload to MDS database repository. Click OK.

Click OK. JAR deployment profile is created, which contains the artifacts to be deployed on to SOA-MDS.

After this create the application deployment profile of type 'soa-bundle' which will be deployed to SOA-Infra. From the 'Application Menu', select 'Deploy' -> 'New Deployment Profile..' option 

Select SOA bundle and click OK

In 'Create Deployment Profile', provide name to the application deployment profile (soabundle1) and click OK

In the 'SOA Bundle Deployment Profile Properties' go to 'Dependencies' and select the JAR archive that we created earlier eg., DBBasedMDSArchive and click OK


 

Click OK

Deploy the application to the soa server. This will deploy all the selected artifacts under the '/apps' metadata namespace on to the SOA MDS database repository.

Verify the artifacts are deployed to DB Based MDS under apps using the MDS connection in Jdeveloper.

This completes MDS configuration for both File based and DB based repositories. To upload artifacts to MDS and to use it in the projects.




1 comment:

  1. BRIEF OF GAMBLING BRIEF OF GAMBLING BRIEF OF GAMBLING BRIEF OF
    The Casino Hotel 안동 출장안마 Resort Atlantic City is in the United States of America and is one of the most 울산광역 출장샵 popular 바카라 사이트 attractions in 아산 출장안마 Atlantic 부천 출장안마 City.

    ReplyDelete