Deleting XML artifacts from SOA infra MDS

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.

Getting ready

Make sure you have deployed some XML artifacts to the MDS repository running on the SOA infrastructure.

How to do it...

  1. To do this we need to launch the WebLogic Server Administration Scripting Shell; go to the directory MIDDLEWARE_HOME/Oracle_SOA1/common/bin.
  2. On Windows run the command 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:

    How to do it...
  3. On the WLST command prompt, execute the following code:
    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.
    
  4. Use the 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.

There's more...

The WLST command purgeMetadata can be used to remove all but the latest version (referred to as tip) of all the artifacts deployed to MDS.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.220.92