Wednesday 9 November 2011

ANT scripts for Database based MDS

– Meta Data store facilitates greater re-use of SOA artifacts such as XML Schemas, EBMs, WSDLs, DVMs, Fault Policies, Rule repositories and Service Data Objects (SDOs) among others.

Here we are going to discuss how to use Database based MDS for storing application specific artifacts mentioned above.

Each MDS repository can have multiple partitions. Partitions are logical separations in the tables to enable metadata from different applications to co-exist in the same physical repository schema without conflicting with each other. We can edit partitions in a repository using EM console or WLST commands.

Each MDS partition should have a well defined directory structure as this affects the way you are going to access the artifacts from your composite applications. Any change in the MDS structure results in change to the composite application.

A typical MDS structure for SOA11g direct integration without using AIA would look as follows. Here SAP2-EBS2 highlighted in yellow is the name of the partition which you want to be created in MDS. This structure is derived from AIA application for the sake of consistency and standardization however it could be anything.


Now that we have the directory structure in place we will write ant scripts to create a zip archive and deploy it to the server using ant script MDSLifecycle.xml. Please go through the comments in the ANT file to understand the variables that we have to set.

Copy MDS artifacts / directory structure to your local machine or to the server and set the variables as specified in the sample. Following commands can be used for deploying / undeploying all the artifacts.


ant -f MDSLifecycle.xml deployMDSArtifacts
ant -f MDSLifecycle.xml undeployMDSArtifacts
We have to establish connection using JDeveloper with the database which is being used for the MDS and then verify if the artifacts are getting deployed or un-deployed from the MDS after executing the commands mentioned above.

In JDeveloper -> Application resources –> connection -> SOA-MDS –> following screen will appear and you have to provide Database connection details.
Once the connection is established through JDeveloper and ant commands are successfully executed we can verify the deployment as shown in following screen.

We will see the advantages of this approach during development phase and how to export / import MDS artifacts and delete individual files from MDS using ant + wlst combination in next article.
VN:F [1.9.11_1134]

No comments:

Post a Comment

xslt padding with characters call template for left pad and right pad

  Could a call-template be written that took two parameters ?   a string, and a   number) return the string with empty spaces appended t...