Skip to main content

Oracle SOA DB Based MDS resource export and import

Hi All,
Today i am going to present a blog over how we can connect with MDS repo and how we can share common resources between multiple SOA project. The basic concept of using MDS repo is to upload some common resources like WSDL,XSD etc.. to a file based MDS repo or DB based MDS repo.
As JDEV default use file based MDS repo, it it good if you are in development mode but if your SOA service is going to live in test or production then it will be good habit to use DB based MDS repo because with DB based MDS repo changes will directly impact in DB and no redeployment will take place for such case.
In SOA Suite 11g there is a widely used option to share artifacts (WSDL, XML, XSD, DVM, Rules, Scripts, Fault Policies, among others …) through MDS – Meta Data Store facilitating the reuse of these artifacts within the SOA projects
I will help you in this post to create and configure the MDS in JDeveloper.
When, for example, a BPEL or BPM project is implemented (deploy) your files are stored in MDS and any change in any artifact will be reflected only in MDS requiring only perform deploy only this file and not an entire project.
Once the MDS is set and stored content, referencing within the project is quite simple, inform, to the location, the full path within the MDS and including oramds prefix. See the example:
To reference the XSD that is the way apps/DemoMDS: do –> oramds/apps/ DemoMDS.xsd

How to deploy resources in SOA MDS Repo:


Select Generic Project
Project Name place MDSSOAExport and click Finish
Now right-click on the project MDSSOAExport and click New
Click Folder and then OK
I will create the first folder “apps
Select Apps folder and click OK
Note: The Resources folder and the readme.txt file are created automatically.
Repeat this same procedure creating folders wsdl” and “xsd” inside the “appsfolder, so they are as follows:
You can delete readme.txt file as they don’t have any use.
Copy WSDL and XSD that you need to share.
Now we configure the adf-config.xml file so that objects (wsdl, xsd or any ot)er file created in MDSSOAExport  project can be shared with other projects.
To edit the adf-config.xml file click Application Resources in your JDeveloper, go Descriptors >> ADF META-INF >> adf-config.xml and open the file.
Note: The adf-config.xml file is unique for application
Locate the following part of your file:
        <metadata-namespaces>
          <namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/>
          <namespace metadata-store-usage="mstore-usage_2" path="/deployed-composites/default"/>
        </metadata-namespaces>
Now let’s add one more line that part of the file should look like this:
<namespace path="/apps" metadata-store-usage="mstore-usage_3"/>
Now well below that of the XML locate the <metadata-store-usages>
This is for file based MDS.
<metadata-store-usage id="mstore-usage_1">
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
              <property value="${oracle.home}/integration"
                        name="metadata-path"/>
              <property value="seed" name="partition-name"/>
            </metadata-store>
          </metadata-store-usage>
Let’s now add the other part of the XML that will also reference our artifacts that should look like this (As we are going to use data base MDS repo so we need SOA RCU DB for same):
Add following code in adf file:
<metadata-store-usage id="mstore-usage_3">
            <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
              <property value="USERNAME_MDS" name="jdbc-userid"/>
              <property value="jdbc:oracle:thin:@DBURL:DBPORT:DBSID"
                        name="jdbc-url"/>
              <property value="soa-infra" name="partition-name"/>
            </metadata-store>
So far everything is OK, you can deploy it to SOA server now.
Now, with the right click button click MDSSOAExport and click Project Properties,Click Deployment and then New
In the screenshot below place the commonResources name and click OK
Note: Can be any other name
In the screenshot below click Contributors and then click on Project Source Path then click OK
In the screenshot below then click OK again.
Now click the right button directly in your application and click Application Properties
Click Deployment and the right side in New
Note: Here we create a deployment type Sounds Bundle, so will give soabundle name
So Archive Type in place the SOA Bundle option
In Name: place soabundle and click OK
Now click Dependencies and the right side select the commons option MDSSOAExport.jpr and click OK
In the screenshot below click OK again
Okay, now you can make the deploy locally of its MDS artifacts
Just remember that to change any XSD or WSDL file that is within the MDSSOAExport  project apps folder. you should do the deploy locally normally, here’s how:
In your Menu, click Application >> Deploy >> soabundle
On the next screen click Next, leaving marked the default option in the case Deploy to Application Server
Click Next again
In this option, select server on which you want to deploy it and click Next
Click Next again
Click Finish
In the guide below its JDeveloper Deployment Log in check appeared the message
Logs:
[10:56:42 AM] Adding shared data file - C:\Users\Sandeep\AppData\Local\Temp\deploy_client_65d96547-1c8f-4320-b505-a4a8d4cf8e9f\commonResources.jar
[10:56:42 AM] Preparing to send HTTP request for deployment
[10:56:42 AM] Creating HTTP connection to host:sandeep-PC, port:8001
[10:56:42 AM] Sending internal deployment descriptor
[10:56:42 AM] Sending archive - commonResources.jar
[10:56:43 AM] Received HTTP response from the server, response code=200
[10:56:43 AM] Successfully deployed archive soabundle.zip to partition "default" on server soa_server1 [http://sandeep-PC:8001]
[10:56:43 AM] Elapsed time for deployment:  2 seconds
[10:56:43 AM] ----  Deployment finished.  ----
Note: If you will login in to http://localhost:7001/em server you will not find deployed JAR in console as only composites are available not the resources.
Now we will connect with our MDS DB Repo.
Click on New and select SOA-MDS connection and provide RCU data base details.
As you can see common resources here now.
Now we can import these resource in any project and can use them.
Create a SOA project.
Drag a web service component in composite file
URL of WSL is look likes:
oramds:/apps/apps/wsdl/Services.wsdl

Hope you will enjoy to work with this blog !!!

Comments

Popular posts from this blog

Oracle SOA 12C rest adapter with Custom HTTP headers

Most existing web applications are connected through web services, which are commonly known as SOAP services. More and more users are relying on mobile devices for communication, and they’re looking for lighter ways to access enterprise information on the go. REST services are the answer for the mobile device platform, because they get rapid responses and fast access to data. Oracle SOA Suite 12 c  provides a complete set of service infrastructure components for designing, deploying, and managing composite applications. Oracle SOA Suite 12 c  enables services to be created, managed, and orchestrated into composite applications and business processes. Some time we have need to send HTTP headers in REST service, In OSB we use header component and add what ever is needed but in oracle SOA 12C it's little bit different. Let see how we can do it. Create one SOA Application. Create one SOA Sample project inside SOA Application. Go to composite and drag drop REST ...

Solution for BPM standard dashboard & activity guide not working in Oracle SOA 12.2.1.0 C

As earlier i publish a post about different issue of Oracle BPM, After some oracle support i got to fixed them. Issue Blog Here... Issue 3:BPM 12.2.1 process workspace activity guide not working. if you have a normal BPM Process, then this is the issue. In order to have data populated in "Activity Guide" firstly you should create a BPMN Guided Business Process. Below you can find the documentation about activity guide and how to create a Guided Business Process: https://docs.oracle.com/middleware/1221/bpm/bpm-develop/GUID-F765955D-90A5-48D4-8D2A-2F01FBB539E3.htm#BPMPD901 And here is specified: " A Guided Business Process is modeled as an activity guide that is based on a business process. The Activity Guide includes a set of Milestones. A milestone is a contained set of tasks that the end user has to complete. A milestone is complete when the user successfully runs a specific set of tasks in the milestone. " And in the below chapters you will find the ...

Swagger API document from Any WADL & Schema in Oracle SOA

Hi everyone, Hope everyone is doing well these days, Recently i started a project work over how to generate swagger API document for your any REST API, In case if you don't know what is swagger please go and check " https://swagger.io/tools/swagger-editor/ ". It's a great and easy to use tool which will help to create user friendly, human readable form API documentation with extension for generating API client in different languages with capability of testing your API from same. What is swagger editor, Design, describe, and document your API on the first open source editor fully dedicated to OpenAPI-based APIs. The Swagger Editor is great for quickly getting started with the OpenAPI (formerly known as the Swagger Specification) specification, with support for Swagger 2.0 and OpenAPI 3.0.  What benefits you will get by using swagger, Runs Anywhere, The Editor works in any development environment, be it locally or in the web. Smart Feedback, Validate you...