In OSB 11g, sharing of resources (WSDL, XSD, XSLT etc…) typically happens using a common OSB project i.e. you create all common resources in single project and refer it from other OSB projects wherever required. In Service Bus 12c also, you would be following the same approach for sharing resources but now you can access resources from MDS. This is very much helpful when you have SOA implementation with MDS and trying to create virtualization layer on top of these services using those WSDLs.
In this post, you will learn to export your resources to MDS and refer resources (wsdl) from MDS to create Business and Proxy Services.
By default, your 12 JDeveloper has a default file based MDS repository and a MDS connection is configured in IDE Connections to access that. The default MDS connection is called SOA_DesignTimeRepository and is shown below. You can use this connection to publish and access the resources.
Navigate to Window -> Resources -> IDE Connections -> SOA-MDS to view the configured MDS connection.
You can observe the properties on right click of SOA_DesignTimeRepository and can see actual location of MDS repository in File System. If required, you can modify this to point to some other location.
JDeveloper supports different operations like Create Folder, Export, Import and Delete of these resources from MDS. And you can also transfer MDS contents to other MDS repository. It’s highly recommended to have some standard folder structure in MDS enabling consumers to quickly locate and access the resources. We will create the following folder structure in MDS:
apps -> ServiceBus -> <<ProjectName>> -> wsdl/xsd/dvm/xslt
Right click on SOA_DesignTimeRepository, select Create Folder and give ServiceBus as folder name.
Similarly, create folders representing your project and wsdl directory as shown below.
Publishing Resources to MDS:
Right click on any resource like WSDL, XSD, XSLT, XQuery and DVM in your Service Bus project and select Service Bus -> Publish To SOA Designtime Repository as shown below.
Choose the appropriate folder as shown below. You also have the option of creating new folders in this wizard.
Click Next. Select overwrite property as per your requirements to override any existing resource with the same name. Here you can observe the resource Target URL which can be used to refer in your SOA Composites. Click Finish to complete the publish.
Note: if you are unable to view resources in MDS repository after publish, do Refresh by selecting SOA_DesignTimeRepository on right click.
Creating Business Service using WSDL from MDS:
Right click on your Service Bus project and select New –> Business Service.
Enter a meaningful name for business service and click Browse WSDLs icon.
Click SOA-MDS tab as shown below and select the WSDL.
Click OK and observer that Import Service Bus Resources wizard appears as shown below.
You can accept default location or can select different location for WSDL in your Service Bus project. Click search icon for Import Location.
Select the required folder and click Select to go back to Import Service Bus Resources wizard.
Verify the Import Location is shown as the folder you selected and click Next.
Click Next.
Click Finish and verify that binding has been selected in Create Business Service wizard as shown below.
Click Next and enter the Endpoint URI of your actual service.
Click Finish and observe that selected wsdl is imported into Service Bus project and a new business service is created.
Similarly, you can create Proxy Services using WSDL from MDS repository and refer resources like XQuery, XSLT and DVMs from SOA-MDS tab in Resource Chooser in message flow.
Observe that there is still no direct way to refer resources from MDS repository in Service Bus 12c and resources always gets imported into project as shown above.
abstract WSDL’s in MDS doesn’t have binding information, then how will pass this info while creating Business service.
how are you populating MDS? And also setting the endpoint url in business service would be sufficient