A file-based, design-time MDS Repository is automatically included when you create a SOA composite application. You cannot modify the MDS Repository name, but you
can modify it to point to an existing repository. Sharing operations are done against the design-time repository. You cannot perform these operations against a database-backed MDS Repository.
This design time MDS Repository is accessible from all SOA composite projects in your local JDeveloper environment. Additionally, the design time MDS Repository is also accessible from Service Bus projects. That last statement requires qualification: at design time – resources can be transferred (i.e. copied) from the MDS repository to a Service Bus project and vice versa, documents can be transferred (i.e. copied) from a Service Bus project to the Design Time MDS repository. This operation can update/overwrite existing resources. The transfer operation will also recognize dependent resources and bring these along as well.
Resource can be opened in JDeveloper directly from the MDS connection to be inspected; they cannot be edited in this way: to be edited, the resources need to be included in a proper project.
To be clear: Service Bus projects cannot contain references to resources in the MDS repository – they can only exchange objects with MDS as a convenience to the developer. SOA composites, as in 11g, can use the oramds: reference to at design time as well as run time refer to resources in MDS.
A simple walk through:
Here you see a straightforward SOA composite project, with a WSDL that references an XSD document. If we want these documents to also be available for use in a Service Bus project, we can right click the WSDL and select the option Share using SOA Design-Time MDS Repository:
The SOA-MDS Transfer wizard opens – to have us select the target folder and the dependent resources to bring along.
On the next page, select (and if necessary create) the target directory:
This page lists the selected resources and their dependencies:
This page provides an overview of the references [to the transferred resources] in the SOA composite that will be updated as part of the transfer you are about to start:
Press Finish to embark on the transfer.
The result of the transfer can be verified under the SOA-MDS connection category in the IDE Connections panel in the Resources window:
The references to the transferred resources have been updated:
Switch to Service Bus project
Open a Service Bus project.
Right clicking on an object in the Design Time MDS repository exposes the option Service Bus | Import Resource.
Select this menu action to transfer the resource to the current Service Bus project.
The transfer dialog starts. Select the target folder – and create one if necessary.
An overview is presented of the resource(s) that will be transferred, including dependent objects. We can deselect any resource that should not be copied into the Service Bus project.
The two resources are copied to the Service Bus project – and the Schemas folder is also created:
Based on the WSDL, we can for example start to create a proxy service. Note that from this point on, there is no link at all between the WSDL resource and the MDS repository.
Suppose we make a change in the AircraftService.xsd document:
Can we feed this change back to the shared copy of this resource in the MDS repository?
Yes, we can.
Right click the resource. Select Service Bus | Publish to SOA Designtime Repository.
This starts the transfer-from-project-to-MDS Repository dialog.
The resources to be published are listed:
and the wizard shows that the repository already contains the AircraftService.xsd. The publish wizard does not do a comparison or intelligent merge. We can instruct it to override the resource in the repository – that is about it.
When we next open the XSD resource from the MDS repository in the context of the SOA composite where it started its life, we will see that the change made in the Service Bus project has indeed be applied:
Creating a new resource in the Service Bus Project
We next create a new resource in the Service Bus project – a Domain Value Map:
This new resource can also be published to the Designtime MDS Repository:
Let’s create a new directory in the MDS repository:
and call it DomainValueMaps:
Press OK, press Next:
And after refreshing the MDS connection
The new resource is visible and available:
When you want to make use of the DVM in another Service Bus project, you use the context menu option Import Resource.
If you want to refer to a resource in the MDS repository from a SOA composite application, you can browse for the resource in the standard browse dialog:
Note: when the Service Bus project has been deployed, the Domain Value Map is deployed as part of the Service Bus project. It is accessible through the Service Bus Design Composer tool – for inspection and even for run time editing:
2 thoughts on “SOA Suite 12c: Sharing resources between SOA composites and Service Bus projects with Design Time MDS”
how to Using the MetaData Services (MDS) in a SOA 12c
What I do in 12c project if I need to share artefacts between SB and Composites is using a SB project called SharedObjects with the folder structure the MDS needs so having an apps folder.
My design-time environment in JDeveloper uses a file-based MDS which points to this SB project root location.
– SharedObjects = MDS root folder for File-based MDS.
Other SB projects in the SBApplication can reference the SharedObjects project.
There is no way to use the runtime MDS in SB projects.
Comments are closed.