Sunday, February 24, 2013

Importing artifacts to the MDS with ant

This blog post is a snippet of my recently published book, Oracle SOA Suite 11g Administrator's Handbook, currently available on Packt Publishing and Amazon. The Kindle and eBook versions are low cost, so it may be something you may want to consider purchasing if you find this blog post useful. There are administration topics that benefit the junior, mid-level, and senior administrators. Myself and my co-author have really dumped everything we know into this, so we hope it will benefit you.
________________________________________________________________________________

Since MDS artifacts and contents are exported as a JAR file, it makes sense for it to be imported in the same manner.

For example, you may have the following files that you just updated on your local file system and wish to import them to the MDS. This may include fault policies, DVMs, and schemas located in the following local directory structure:
/tmp/svn/SOAMetaData/faultPolicies/fault-bindings.xml 
/tmp/svn/SOAMetaData/faultPolicies/fault-policies.xml
/tmp/svn/SOAMetaData/dvm/CurrencyCode.dvm 
/tmp/svn/SOAMetaData/xsd/ErrorHandling/errorEvent.xsd
Firstly, you should zip up the contents of the ~/SOAMetaData subfolder generating a single SOAMetaData.jar file:
cd /tmp/svn 
zip -r SOAMetaData.jar SOAMetaData
The JAR file is now ready to be imported to the MDS to maintain the same directory structure inside the MDS:
ant -f ant-sca-deploy.xml deploy -Dwl_home=/u01/app/middleware/wlserver_10.3 -Doracle.home=$ORACLE_HOME -DserverURL=$SOAURL/soa-infra/deployer -Duser=$USERNAME -Dpassword=$PASSWORD -Doverwrite=true -DforceDefault=true -DsarLocation=SOAMetaData.jar
Don't forget to set your environment! Details in the book!


Application versions:
  • Oracle SOA Suite 11g (11.1.1.3+)

References:

No comments: