Search Results

Tuesday, December 08, 2015

How to deploy MDS files to SOA suite 11g/12c

How to deploy mds using Jdeveloper?

One of the new features in Jdeveloper 12c is the ability to transfer mds data directly from the JDeveloper to the server.

  • Create new local MDS connection in JDeveloper
    • File > New > From Gallery > Search for SOA-MDS connection

  • Similarly create MDS connection to the remote server that you want to deploy to.
  • Now right click on your local file based mds and select Transfer To
  • And select the folders, files and your target mds connection.

  • Finally click OK

Unfortunately it doesn't work on jdeveloper 11g and your gonna have to rely on ant script.

How to deploy mds using ANT?

This is a really simple script to deploy MDS on Oracle SOA suite and it should work on both 11g and 12c SOA suite.

Create both file and build.xml file in the same folder as your MDS folder.

Folder structure should look as follows:
#MDS folder in your current directory

#this is the oracle middleware home.

<?xml version="1.0" encoding="iso-8859-1"?>
   Deployment Scripts for SOA Suite 12c, MDS
   Author : Prasanna Jayaraman
   Version: 4.0
<project name="exportMDS" default="exportMDS">
  <property file=""/>
  <target name="exportMDS">
    <echo>export and create local MDS temp</echo>
    <echo>create zip from file MDS store</echo>
    <delete dir="deploy"/>
    <mkdir dir="deploy"/>
    <zip destfile="deploy/mds.jar" compress="false">
      <fileset dir="${mds.repository}/apps"/>
    <ant antfile="${middleware.home}/soa/bin/ant-sca-deploy.xml" inheritall="false" target="deploy">
      <property name="wl_home" value="${middleware.home}/wlserver"/>
      <property name="oracle.home" value="${middleware.home}/soa"/>
      <property name="serverURL" value="${deploy.serverURL}"/>
      <property name="user" value="${deploy.user}"/>
      <property name="password" value="${deploy.password}"/>
      <property name="overwrite" value="true"/>
      <property name="forceDefault" value="true"/>
      <property name="sarLocation" value="deploy/mds.jar"/>
      <property name="failOnError" value="true"/>
    <echo message="finish" level="info"></echo>

How to delete deployed MDS?

If you deployed wrong files or deployed file to a wrong path, you could delete the document in the mds using the following commands. It works on both 11g and 12c SOA suite. 

Open cmd and enter the following
set JAVA_HOME=C:\UBM\Programs\jdk1.7.0_79

set path=C:\UBM\Programs\jdk1.7.0_79\bin;C:\Oracle\Middleware12c\Oracle_Home\oracle_common\modules\org.apache.ant_1.9.2\bin;%PATH%

cd C:\Oracle\Middleware12c\Oracle_Home\soa\common\bin


connect('weblogic', 'welcome1', 't3://localhost:7101');


This command will delete all the files under /apps directory in mds. If your using unix or linux then use linux syntax for setting path variable and java_home and then run under the same oracle path.

Other Useful Links

Post a Comment