Tuesday, October 22, 2019

12c SOA - File based MDS or MDS reference locally using designTimeRepository and adf_config_xml

Create a local MDS or file based MDS using design time Repository and use in services. It helps us to achieve faster development without moving the artifacts in the db based MDS.

Step1: Create local soamds and view artifacts structure from file mds.
Go to Resources⇾SOA-MDS⇾ right click and click properties.
Now you can see the default soamds path.
Copy the path: C:\JDeveloper\mywork\soamds\ and go to that folder and Paste that apps folder containing all artifacts with a proper structure.s 
Now go to Jdeveloper and refresh the DesignTimeRepository
 Now if you expand the DesignTimeRepository, you can see the artifacts structure as below.
Step2: create adf-config.xml connection with local mds
Go to Application resourcesàDescriptorsàadf-config.xml
 By default this file looks like below
 Add the below line under metadata-namespaces
<namespace metadata-store-usage="mstore-usage_2" path="/apps"/>
Add the below code of lines under metadata-store-usages
 <metadata-store-usage id="mstore-usage_2">
      <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
          <property name="partition-name" value="mds"/>
           <property name="metadata-path" value="C:\JDeveloper\mywork\soamds\"/>
       </metadata-store>
   </metadata-store-usage>
 Step3: Now open a project/composite and remove the shareable artifacts from that project one by one and kept in local mds with proper naming convention (if not exists) and give mds reference in that project for that artifacts.

Example for – WSDL:
Generally we should give mds reference in wrapper wsdl and in composite.xml.
Step i: Remove TicketingService.wsdl
Step ii: Go to TicketingServiceWrapper.wsdl and change the location with mds path
Replace TicketingService.wsdl with oramds:/apps/soa/wsdl/AskNow/V1/TicketingService.wsdl

Step iii: Go to Composite.xml and search with the wsdl name like “TicketingService.wsdl” and replace each one with mds path oramds:/apps/soa/wsdl/AskNow/V1/TicketingService.wsdl
For referenceàBinding.wsà location   Keep it as same like endpoint URL

Note: If any WSDL needs to import in MDS then first remove the Service part to make it abstract.

3 comments:

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...