Monday, October 25, 2010

Creating an MDS connection through JDeveloper 11g

You can easily navigate objects in the MDS through JDeveloper.

This post describes how to create an Oracle SOA Suite 11g Metadata Store (MDS) connection through JDeveloper 11g in which you can navigate the objects stored within the MDS.

Artifacts such as schemas, WSDLs, fault policies, and configuration files in SOA Suite 11g are now stored in the MDS (i.e., e.g., database) instead of the file system only as was previously the case in SOA Suite 10g.

1. Open JDeveloper 11g

2.Click on File -> New -> Connections

3. Choose Database Connection:
 4. Enter your database information to your MDS as follows:
5. Go back and create a new connection, this time, choose SOA-MDS Connection:
 6. Choose "DB Based MDS", choose the connection created in the previous step, and select the "soa-infra" MDS partition:

Now, under the Resource Palette, you will notice the SOA-MDS connection under IDE Connections:
You can now reference artifacts in the MDS through your code.

Referencing DVMs (through attributes or XSL)

Fault bindings in composite.xml
<property name="oracle.composite.faultBindingFile">oramds:/apps/AIAMetaData/faultPolicies/fault-bindings.xml</property>

Schema or WSDL import
<xsd:import namespace="" schemaLocation="oramds:/apps/AIAMetaData/AIAComponents/hello.xsd"/>


Sabir said...

I'm unable to view the SOA-INFRA Partition while trying to create SOA-MDS Connection in Jdev instance.
Any idea ?

Ahmed Aboulnaga said...

Assumming that your Database Connection works fine in JDeveloper, the most likely reason for this is the lack of permission of your database account.

Use the "<prefix>_MDS" database account in your Database Connection instead (e.g., DEV_MDS, TEST_MDS), and you should have no problems.

vivek said...

How can i update AIAConfigurationProperties.xml from Jdeveloper 11g and deployed the same into MDS. Here i am able to connect MDS and able to see AIAConfigurationProperties.xml but not able to update and deploy the same into MDS from jdeveloper11g.

Anonymous said...

Unfortunately, you cannot edit it through JDeveloper. You must use ant.

This is probably the simplest way to go about it:

(1) Export the contents of the MDS using ant, as shown:

REM Set your environment first
ant -f ant-sca-deploy.xml exportSharedData -DserverURL=%SOAURL%\soa-infra\deployer -Duser=weblogic -Dpassword=welcome1 -DjarFile=AIAMetaData.jar -Dpattern=**

(2) This will create an "AIAMetaData.jar" file which includes the entire contents of the MDS

(3) Unzip this file onto your local file system.

For example, c:\MDS\AIAMetaData\....

(4) Delete all files except for AIAConfigurationProperties.xml (keeping it in its correct path)

(5) Update AIAConfigurationProperties.xml

(6) Zip up the c:\MDS\AIAMetaData directory, naming the file AIAMetaData.jar

This JAR file should contain a single file, which is AIAConfigurationProperties.xml, under the path AIAMetaData\config\AIAConfigurationProperties.xml

7. Import the JAR file to the MDS using ant, as shown:

REM Set your environment first
ant -f ant-sca-deploy.xml deploy -Dwl_home=%WL_HOME% -Doracle.home=%ORACLE_HOME% -DserverURL=%SOAURL%\soa-infra\deployer -Duser=weblogic -Dpassword=welcome1 -Doverwrite=true -DforceDefault=true -DsarLocation=AIAMetaData.jar

For details on using ant, check out:

Anonymous said...

Check this out too, which appears to be an even more simpler way: