When we deploy XML artifacts to MDS, it's a cumulative operation, in that new artifacts are added to MDS and artifacts that already exist in MDS are replaced by a new version. But, if I don't deploy an artifact, then the previous one remains.
For example, if I deploy an SOA bundle containing A.xsd
and B.xsd
to MDS, and then deploy a new version of the SOA bundle containing A.xsd
(an updated version) and C.xsd
to MDS, I will have A.xsd
(new version), B.xsd
, and C.xsd
deployed to MDS.
In addition, every time we deploy a new SOA bundle, MDS retains the previous version of the SOA bundle.
Because of this, we often need to clean up and remove unnecessary and unwanted files from the MDS repository.
Make sure you have deployed some XML artifacts to the MDS repository running on the SOA infrastructure.
MIDDLEWARE_HOME/Oracle_SOA1/common/bin
.wlst.cmd
, and on Unix run the command wslt.sh
.This will open the WebLogic Server Administration Scripting Shell (WLST) in offline mode, as shown in the following screenshot:
connect('adminuser', 'adminpassword', 't3://hostname:port')
For example:
connect('weblogic', 'welcome1', 't3://localhost:7001')
The WLST should confirm that you have connected successfully with the text, similar to:
Connecting to t3://localhost:7001 with userid weblogic ... Successfully connected to Admin Server 'AdminServer' that belongs to domain 'soa_domain'. Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead.
deleteMetadata
command to remove the XML artifacts from MDS, for example:deleteMetadata(application='soa-infra',server='soa_server1',docs='/apps/core/**')
This will delete all the content under the /apps/core
location in MDS.