Sunday, November 24, 2013

Meta Data Store(MDS) Setup in SOA 11g

SOA Suite 11g has a provision for sharing SOA artifacts through MDS – Meta Data Store. This facilitates greater re-use of SOA artifacts such as XML Schemas, EBMs, WSDLs, Fault Policies, Rule repositories and Service Data Objects (SDOs) . You can configure MDS as  file-based or database-based. 

MDS is created under JDEV_HOME/integration/seed directory. Default folder “soa” is used to store common system soa artifacts. All custom artifacts are supposed to be stored under a folder called “apps”, since this folder already exists in server.

Create directory structure under apps folder. In my case, I’ve created folder structure JDEV_HOME/integration/seed/apps/myproject/xsd/ to store XML schema files. This ideally should match your schema structure.

1. First you go to your local 11g Jdeveloper installation folder. In my case it is C:\OracleFMW\Middleware\jdeveloper\integration folder .You can see seed folder , If not create a seed folder.
2. Now create folder with name apps under seed.
3. Under apps you can create your folder structure to place all your XSD, WSDL files like   apps/xsd/employee.xsd  etc.
4. Create MDS connection in jdeveloper as below.
New -> Connections -> SOA-MDS Connection




5. The SOA-MDS connection can be created in two ways. One is File Based MDS and other is Data Based MDS.

6. In Create SOA_MDS Connection window, select File Based MDS as Connection  Type for file based MDS connection, we will point to the local folder in our system   where all the WSDL and XSD files are placed as shown below. So when we use the wsdl and xsd files in the  project, they will be referred from the local system.





7.Click OK. Now the File Based MDS connection is created.

8. Lets see how to create DB based MDS connection. In Create SOA_MDS Connection window, select DB Based MDS as Connection Type for file based MDS connection.


9. For DB Based MDS connection, we should have created all the schema for the weblogic in the database by running the Repository Creation Utility (RCU) wizard. After RCU execution, the DEV_MDS schema will get created in the database. We need to use the DEV_MDS schema connection and soa-infra as MDS Partition while creating the DB Based MDS connection as shown in the above screen shot.( Get in touch with your DBA for MDS schema credentials)

10. Click OK. Now the DB Based MDS connection is created.

Deploy MDS repository to Weblogic Server
First, we need to create JAR file bundle to include schemas,WSDL's  we need. Then we need to include this jar file into a SOA bundle that can be deployed to the SOA Server.

In JDeveloper Create Generic Application - MediatorMetaData

Create a project – MediatorLib
Right click on MediatorLib and select New –> Deployment Profile –> JAR File


Enter mediatorlib as the deployment profile name.

In the JAR deployment properties dialog, click on Contributors, click on Add button and select apps directory from your JDeveloper seed location – JDEV_HOME/integration/seed/apps  As for below screenshots


Click on OK. This completes creation of JAR file. We now need to create an application deployment profile to install these schemas in SOA Server.

Right click on MediatorMetaData application and select Deploy –> New Deployment Profile. Select “SOA Bundle” as Profile type.

Enter mediatorlib for Deployment Profile Name. From the properties dialog, open Dependencies and select mediatorlib.


To deploy MediatorLib to SOA Server, right click on MediatorMetaData and select Deploy –> mediatorlib.

How to refer MDS Files in the Project
In JDeveloper, under Application resources expand Descriptors/ADF META-INF and open adf-config.xml.