Sharing artifacts using the MDS Repository

Both during development and maintenance of code, deployment strategies relying on copying of artifacts will fail, or at least complicate the task at hand and frustrate reuse. SOA Suite offers a centralized storage for artifacts (like WSDL, XSD, and XSL files) that can be accessed both at design time and at run-time. It is called the MDS Repository, and comes with Metadata Services on top of it. It is part of the SOA Suite and doesn’t require additional installation. This blogpost will show you how to upload an artifact to the central MDS Repository, and how to use the uploaded artifact in your source code.

Locate and copy the WSDL

Locate the WSDL file in your project on the local file system, for example: C:\JDeveloper\mywork\AIApocBOUW\CreateInventoryTransactionRIBRMSProvABCSImpl.wsdl. In which a convention like C:\JDeveloper\mywork\__Workspace__\__project__ is used. You can also determine this path in JDeveloper by selecting the WSDL file and use CRTL-SHIFT-C (or by selecting contextmenu – Copy Path).

Use an FTP tool to move the file to the server running the SOA Suite. The path to use on the server depends on the application, version and component type. Typically in AIA there is a structure like $AIA_HOME/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/__Application__/__version__/__componentType__ . Where in AIA component types are ABCS Provider, ABCS Requestor, EBS, et cetera. In other environments you can create your own structure. Since you no longer need a local copy of the WSDL, remove it from your local file system.

Load the WSDL in the MDS Repository

To load the WSDL and other artifacts to the MDS repository there is an ANT script available on the server. To use ANT, make sure the needed environment settings are made correctly. When you installed AIA there is a Shell script available the will source both AIA and ANT environments: aiaenv.sh. This script can be found in ...../weblogic/aia30/aia_instances/aia30poc/bin. It can be convenient to copy this to your home directory.

  • Source AIA and ANT environment: source ./aiaenv.sh.
  • Alter the UpdateMetaDataDP.xml configuration file. It can be found in ...../weblogic/aia30/aia_instances/aia30poc/config.

In case your vi isn’t up to par use a tool like WinSCP and choose Edit in the context menu:

In the UpdateMetaDataDP.xml file alter the file set. In the example on which the screenshot is based
AIAComponents/ApplicationConnectorServiceLibrary/Retail/V1/RequesterABCS/CreateStockChangeLOCUSReqABCSImpl.wsdl
is added.

And now you are ready to run ANT using the actual loading script:
ant –f /fs01/app/oracle/esbtst01/weblogic/aia30/Infrastructure/Install/scripts/UpdateMetaData.xml


Check the output of the ANT script:

  • check that the correct number of files has been copied.
  • the server gave a HTTP response 200.
  • The deployment of the composite was successful.

Another check to verify a correct load into the MDS Repository is to use the MDS Browser in JDeveloper to find the file you just uploaded. A refresh of the view could be needed to include the latest changes and additions.

Using the WSDL in the MDS Repository in your source code

The last step is to reference to the WSDL in the MDS Repository, since the file has been removed from the local file system. Double click the Exposed Service to open the wizard:

Choose Existing WSDL to select the WSDL from the MDS Repository:

Check the change using the source view. In the import of the WSDL in the composite.xml there should now be an URL referring to oramds:, like in the example below:

<import namespace="http://xmlns.oracle.com/ABCSImpl/LOCUS/Core/CreateStockChangeLOCUSReqABCSImpl/V1"
        location="oramds:/apps/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/Locus/V1/RequesterABCS/CreateStockChangeLOCUSReqABCSImpl.wsdl"
        importType="wsdl"/>

7 thoughts on “Sharing artifacts using the MDS Repository

  1. Edwin Biemond

    Hi
    don’t forget to update your adf-config.xml and add the the metadata store. Else this won’t work. And for this you need to have an AIA license.

    If I was you I would use a local MDS with the apps/AIAMEt../Application/yourapp. update your adf-config.xml where you use the local MDS , add this to your subversion.
    and use this MDS bat script to synchronize ( http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html ) and voila it is in Sync.

    much easier , is in version control and work locally. 🙂

  2. PeterPaul Post author

    Hi Edwin,

    I agree that it can be _very_ convenient to use the local MDS. An automated mechanism to ensure that the shared artifacts in the local repository are also available in the central MDS is very needed to avoid the pitfalls of the “copy” scenario. The ANT file given in your blogpost is a great way to achieve this.

  3. DS

    Hi Peter,

    I would like to know how to delete the wsdls or xsds that have been uploaded into MDS.

    I was working on some test solution and uploaded some xsds into ApplicationObjectLibrary/EBiz/Core/V1

    Instead of this path I want to place them under ApplicationObjectLibrary/Ebiz/V1/Schema.
    I can upload the xsd to this folder, However old files will still reside in MDS. How do I delete those files from earlier folder path?

    Could you please list the steps.

    Thanks

  4. Madelaie

    PeterPaul : I think this blog post on removing shared files from MDS can help you. Creo que esta entrada del blog sobre la eliminación de archivos compartidos de los SMD pueden ayudarle. hth hth

    Hola soy nueva en esta pagina, tengo problemas para desplegar mi aplicacion con MDS, yo realizo el despliegue a travez de los script de Ant y ademas tengo que utilizar un repositorio de metadatos MDS para la personalizacion de la aplicacion, el repositorio ya esta credo en el weblogic ,solo necesito algun comando de ant que me permita desplegar a traves de ant la aplicacion y declare la particion del MDS.para que no me de el siguente error:
    BUILD FAILED
    D:\Datys\DataCenter\Source\Main\build.xml:19: The following error occurred while executing this line
    :
    D:\Datys\DataCenter\Source\Main\MainView\build.xml:553: weblogic.Deployer$DeployerException: weblogi
    c.deploy.api.tools.deployer.DeployerException: Task 53 failed: [Deployer:149026]deploy application e
    Tes-MainApp [Version=1.0.0.1] on AdminServer.
    Target state: deploy failed on Server AdminServer
    weblogic.application.ModuleException: :oracle.mds.config.MDSConfigurationException:MDS-01335: namesp
    ace “/persdef” mapped to metadata-store-usage “mdsstore” but its definition was not found in MDS con
    figuration.

  5. Madelaie

    como puedo especificar el repositrio de metadatos de destino antes de desplegar la aplicacion ? , existe alguna configuración en el archivo adf-config.xml para esto?

Leave a Reply

Your email address will not be published. Required fields are marked *